OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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... :-\
-
sorry for sounding a bit lame but do ya want a smoke tail ON the flare itself all the way up ??? :)
-
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?
-
no(pe)body?
:-\
-
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.
-
OMG what a god damn beautiful picture.. what plane is that..
is this picture form the ECP MOD??
Rhys
-
@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...) :
this AddEventHandler ["fired",{_this exec "flareFX.sqs"}]
then the flareFx -script
_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
-
Thanks Blanco..
I shall give this script a try and let you know :)
Thx
Rhys
-
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..