OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Don_T_Shoot on 14 Feb 2004, 17:32:15
-
My apologies if this has been covered but I havent' found anything searching here and elsewhere on this situation.
I want to trigger a script when a satchel is detonated in a certain trigger area.
Using the eventhandler "Fired" I got the following return when I put a satchel:
weapon: put
muzzle: put
mode: pipebomb
type: pipebomb
But nothing is returned from the EH when I touch off the satchel, so I dont' think I can use the "Fired" EH to detect the use of a satchel and start script.
Any ideas on ways of detecting an action of a satchel touch off?
-
OK after some experimentation, I realized I was thinking about it wrong. Touching off the satchel doesn't matter.
What I 'm trying to do is to trigger a script that blows up a fuel station/ ammo dump in a chainreaction of scripted explosions set into motion with a players satchel.
So, the idea is to detect when a satchel is put near the ammo/fuel cache, repair the objects just in case and then wait for them to be destroyed to set off chainreaction (cachetrigger = true) then make sure it can't be repeated (bravointact = false)
_mode=_this select 3
?_mode=="PipeBomb":goto "damagecheck"
goto "exit"
#damagecheck
_crates = [fuel,ftruck,a0,a1,a2,a3,a4,a5,b24,b25,b26,b27,b28,b29,ammocrate1]
"_X setdammage 0" foreach _crates
@"!alive _x" count _crates >= 1
cachetrigger = true
bravointact = false
goto "exit"
#exit
exit
-
cool, just what I need!
I did the same with a different script but your methode is a lot easier, thx ;)