Jump to content
Sign in to follow this  
Kydoimos

Training Target Trigger

Recommended Posts

Heya all - does anyone know the script that activates a trigger when a training target's knocked down? Essentially, I want to end the mission when a certain target is hit. Any ideas?

Share this post


Link to post
Share on other sites

I take it it's not treated as a living object is it?

Share this post


Link to post
Share on other sites

Two Target Oval (Ground):

Target One's init:

this addEventHandler ["Hit", {targetHit  = "Orange"}];this setObjectTexture [0,'#(argb,8,8,3)color(0.6,0.3,0,1)'];

Target Two's init:

this addEventHandler ["Hit", {targetHit = "Green"}];this setObjectTexture [0,'#(argb,8,8,3)color(0.3,0.6,0,1)'];

Trigger Condition:

!(isnil "targetHit")

Trigger onAct:

hint format["The %1 target was hit", targetHit]; targetHit = nil; publicVariable "targetHit";

Share this post


Link to post
Share on other sites

Ah, thanks mate! That's brilliant! I take it a variation of the above will work for the pop-up target and simple targets? Perhaps I just need to change "Orange" or "Green" to the name of the target and ignore the setObjectTexture? I'll fiddle with it tonight and try. Again, as always, thank you!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×