OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 06 Feb 2004, 19:11:56

Title: smoketrail -script for flares
Post by: Blanco on 06 Feb 2004, 19:11:56
Hi,

I need a drop- script that executes a smokescript when I fire a flare.

I need an EH "fired" that only runs when the player fires a flare (this part works)...but how can I attach the smokescript to the projectile (the flare)?

I tried every parameter in the EH script (exept _this select 0, because that's the shooter). Nothing works... :-\










Title: Re:smoketrail -script for flares
Post by: Tomb on 06 Feb 2004, 21:30:31
sorry for sounding a bit lame but do ya want a smoke tail ON the flare itself all the way up  ??? :)
Title: Re:smoketrail -script for flares
Post by: Blanco on 06 Feb 2004, 21:43:24
Exactly, like in this pic :

http://gallery.cybertarp.com/albums/userpics/14859/f16_god.jpg

But here the flare itself (the flash) is a effect, it's not a projectile.

I also tried  in the EH "fired" script :

_flare = nearestobject [_this select 1,_this select 4]

_flare exec "smokescript.sqs"

no succes... :-\

all the way up?  No, if possible all the way down,  :D
I don't know how to check the flare's his highest point after firing, those are probs for later, right now  I'm satisfied with a...

@_flare distance  (_this select  0) > 100

...line before executing the dropscript

it must be possible , because how did ECP it with the AT backblast FX?

Title: Re:smoketrail -script for flares
Post by: Blanco on 09 Feb 2004, 19:29:52
no(pe)body?

 :-\
Title: Re:smoketrail -script for flares
Post by: macguba on 09 Feb 2004, 23:01:11
If ECP did it, take it to bits and see what they did.    I don't suppose they will mind you borrowing parts of it as long as you give proper credit.
Title: Re:smoketrail -script for flares
Post by: rhysduk on 10 Feb 2004, 18:34:06
OMG what a god damn beautiful picture.. what plane is that..

is this picture form the ECP MOD??

Rhys
Title: Re:smoketrail -script for flares
Post by: Blanco on 10 Feb 2004, 18:57:41
@Rhys i think it's the latest F16 from VIT...

I found it : (I've used a part from an old script from  Igor Drukov)

Put in the init (a unit with flares, a night officer...) :

Code: [Select]
this AddEventHandler ["fired",{_this exec "flareFX.sqs"}]

then the flareFx -script


Code: [Select]
_man = _this select 0
_projectile = _this select 4

?_projectile != "flare" : exit
_object=nearestobject [_man,"flare"]

_pos=getpos _object
_life =30
_delay = 0.01
_lifeTicks = _life / _delay
_life = _lifeTicks


;;yeah... I added a flare sound
~1.4
;;playsound "flare"

#Begin
_pos=getpos _object

_shade = 0.65 +random 0.3
_smoke=drop["cl_basic","","Billboard",1,5,_pos,[0,0,0],0,1,1,0,[0.5,3],[[_shade,_shade,_shade,0.9],[0.8,0.8,0.8,.1]],[0,1],2.8,1,"","",""]  

~0.0001*_delay
_life = _life - 1
?_life > 0 : goto "Begin"
exit



Title: Re:smoketrail -script for flares
Post by: rhysduk on 10 Feb 2004, 20:39:44
Thanks Blanco..

I shall give this script a try and let you know :)

Thx

Rhys
Title: Re:smoketrail -script for flares
Post by: rhysduk on 14 Feb 2004, 15:12:27
Hi,,

For the love of god i cannot get this to work.. Can someone plz help me ?

I have tried for numerous hours.. but wiht no luck...

Some one hepl plz

Rhys
___________________________________________________________

EDIT... : - Got it working :) thx Blanco - this effect is absolutely amazing ;D .. thx again..