Just for info: i also wasn't born as an OFP scripter
OK, you've copied and pasted what i told you and now
i'm goin to do what i've promised to you.
First off: i just noticed that i've been talking about the
wrong eventhandler (i said "HIT", but meant "FIRED")
;D
However that's no prob for now:
Just one more thing:
if you scroll down to the bottom in the comref, where there
are the eventhandlers, you will also find a nice entry by
General Barron: more info about eventhandlers
http://www.ofpec.com/editors/resource_view.php?id=543Also if you do not understand a command in the comref, at least
you know then how it's correct spelling, so that you could click
on the "search" button, just to have a look if somebody else may have been asking the about the same stuff yet (believe
me, there were already plenty of them).
There are also unofficial comrefs, where you will find even
more informations about commands, based upon experiences
by others.
OK, now to your problem:
First you need to create an array of all units, you want to
monitor, wether they fired or not, and then you need to add
them the mentioned eventhandler. Also you need to initialize
a variable, which you will set to true, once somebody started
firing.
You could do that by placing a trigger:
Size: as big as it covers all those units at the start of the mission.
Activation: anybody present - once
condition: this
onActivation: shotfired = false; shooters = thislist; {_x AddEventHandler ["fired",{shotfired = true; publicVariable {shotfired}}] forEach shooters
Now you need one more trigger, that will be waiting for the variable, and will remove all eventhandlers from these guys.
This is also the trigger, which you should use to do whatever
you wanted to do, once they started firing:
Size: 0/0
Activation: none - once
condition: shotfired
onActivation: {_x removeAlleventhandlers "fired"} forEach shooters; hint "oh no the box of Pandora has been opened"
:note - the second command (the hint message) in the onActivation field represents what you want to do there - just exchange it by whatever you.
That's it
~S~ CD