Jump to content
Sign in to follow this  
therev709

Trigger set to once, but is repeating

Recommended Posts

I'm having a problem with a trigger activating repeatedly . . . I've searched and come up with nothing :/

Basically, I have a series of tiggers around the map, that when the OPFOR detects "any group member" of the player's group, "DISC = TRUE" is activated.

Another trigger is activated by "DISC" that then activates a script.

What happens is the script is activated repeatedly every single time a soldier from the payer's group is detected. What I'm trying to do is have the script activated only once the first time a player from the group is detected by opfor.

Here is what I've tried so far:

To have the detected by trigger activate "DISC = DISC +1" and the script activated trigger only be activated by "DISC ==1"; this failed.

To have UNDET = TRUE in the init, and have the detected by trigger activated by any group member (also tried group leader only) AND UNDET. Then in the script (and also the detected by trigger's activation) set UNDET to FALSE. This also failed.

The script simply starts a new music file and has the words "Your team has been detected, Russian soldiers will now shoot on sight," and then set resistence and russian as enemies. What happens is this script is actived EVERY time the player is detected by the enemy, and I only what it to activate the first time.

Also, like I said, each trigger is set to activate ONCE, not repeatedly.

I'm at a loss, thanks in advance for the help :D

Jon

Share this post


Link to post
Share on other sites

Yeah im havin a similar problem where a civilain spawns within one of three triggers. The trigger he spawns in determents where a box is created, however playing MP i find that the boxes have kept spawing and instead of one, there is 8ish~. I think the problem is related to how many people join the game (ie every time someone joins, the trigger fires again, and new box is spawned)

Help! lol

Share this post


Link to post
Share on other sites

Is this mission being played in multiplayer? If not, can I see the script?

Share this post


Link to post
Share on other sites

Cheers for reply,

Would that be deleteEditorObject command??

Share this post


Link to post
Share on other sites

No, just deleteVehicle. However, this isn't really what you'll want to do for your situation. Instead, put isServer in the condition field. This will ensure than only the server creates the spawning box; the clients won't be messing things up by running the trigger themselves.

Share this post


Link to post
Share on other sites

I figured out my problem . . . I had created a trigger that added an event handler to each OPFOR where if they were killed, it executed the script. I don't know what I was thinking at the time, but I simply changed the event handler to if the unit was killed, DISC would equal TRUE.

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  

×