OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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..
-
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]
-
is every think from _area = 5 partof a script to be activated by "art.sqs"
-
i tried that but an error message comes up at top of screen..
-
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.
-
How can I get a flare to go up in the air...say once a soilder..walks towards it and triggers it..
;[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
-
You don't need any fancy script for it. In the trigger's Init field put:
flare1 = "flare" camCreate [getPos _triggername select 0, getPos _triggername select 1, 150]
_triggername - the name of the trigger
150 - fare's initial height (adjustable)