OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: headshot_snipe on 06 Sep 2002, 21:12:26
-
Hullo ;D
Just wanna to ask if i could make a flare shoot up from no ???where and how to do that.
Thanks
HSS
-
Write this in "On Activation" of a trigger:
flare1 = "flare" camcreate [ X , Y , Z ]
You've to copy the coordinates from your mission.sqm (think should be the ones from the trigger)...but notice in .sqm they're written [ X , Z , Y ] so you've to change the last two coordinates in the trigger.
Z is the height and you can change it how you need it.
Greetz
Plage
-
Could you put it over a gamelogic; If so how.
-
nstead of camcreate on XYZ call the game logic something, like Surprise, and put the name on it:
game logic name:Surprise
Trigger onactivation field:
flare1="flare"camcreate getpos surprise
I think that should do.
-
Even better, make it a radio command and repeatedly.. and setpos to your player ;) or maybe a bit behind who knows.. :cheers:
-
yup
I think you may need brackets though
the syntax I use is
Light = "flare" camcreate [getpos logic select 0, getpos logic select 1, (getpos logic select 2) + 100]
the logic being the gamelogic. the 100 being the height is pops up at.
this is the way I have to do it for resistance but the other way should be as good.
-
Thankx to you all.
It works and its great.
Just one more thing, how do i make it ascend and descend nstead of making it apear a 100 meters above the ground?
Thanks
HSS
-
i dont think you can but theres a good script in the code snippets that uses two fires that arc on a trajectory that actually fire throught the air
-
I know its not really what you want but if you were prepared to have a dude fire it you'd get the right arc .... make sure he is a grenadier and put in his init field
this removemagazine "grenade"; this addmagazine "flarered"; this addweapon "flarered"
and at the appropriate moment
dude fire "flarered"
or flare, flaregreen etc.
If you didn't want to have the dude around you could teleport him in and out again from a far corner of the map with the old setpos spell.
-
You can setpos the flare each second (or what ever) to +1 meter (or even -1 meter)...but therefore you've to write a script. So it should ascend/descend like you want it to.
Greetz
Plage