OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 22jacket on 07 Jun 2006, 12:37:29

Title: flares..
Post by: 22jacket on 07 Jun 2006, 12:37:29
Hi there ..
How can I get a flare to go up in the air...say once a soilder..walks towards it and triggers it..
Title: Re: flares..
Post by: Speeder on 07 Jun 2006, 12:50:03
Fire up your Editor
Set a Marker called "art" (no quotes)
Make a trigger, set i to Radio alpha
In the On Activation field type in:   ["art",20,3] exec "art.sqs"


_area = 5
_shells = 1


_CentrePos = GetPos _Player
_xco = _CentrePos select 0
_yco = _CentrePos select 1
_zco = _CentrePos select 2
   
_areaX2 = _area * 2

~1
titletext ["\n\n\n\n\n\n\nFlared Deployed !","plain", 2]

~1

_a = _shells

#start

_bomb1 = "FlareRed" camCreate [_xco + Random(_areaX2) - _area,_yco + Random(_areaX2) - _area,_zco + 40]




Title: Re: flares..
Post by: 22jacket on 07 Jun 2006, 13:05:51
is every think from _area = 5 partof a script to be activated by "art.sqs"
Title: Re: flares..
Post by: 22jacket on 07 Jun 2006, 14:11:48
i tried that but an error message comes up at top of screen..
Title: Re: flares..
Post by: The-Architect on 07 Jun 2006, 14:57:39
Try this.

Add an invisible Helipad to the place you want your flare to appear. Setpos it 200m in the air and then camcreate the flare on it's position when your guy hits the trigger.
Title: Re: flares..
Post by: Mandoble on 08 Jun 2006, 08:50:39
How can I get a flare to go up in the air...say once a soilder..walks towards it and triggers it..

Code: [Select]
;[getPos gamelogic1, 20]exec"fireflare.sqs"
_pos = _this select 0
_velup = _this select 1

_posf = [_pos select 0, _pos select 1, 1]
_flare = "FlareGreen" camCreate _posf
_flare setVelocity [0.1,0.1,_velup]
exit
Title: Re: flares..
Post by: rado1265 on 08 Jun 2006, 18:45:50
You don't need any fancy script for it. In the trigger's Init field put:

Code: [Select]
flare1 = "flare" camCreate [getPos _triggername select 0, getPos _triggername select 1, 150]

_triggername  -  the name of the trigger

150  -  fare's initial height (adjustable)