Staredit Network > Forums > SC2 Assistance > Topic: Trigger firing issue
Trigger firing issue
Aug 18 2010, 7:16 pm
By: Vincent  

Aug 18 2010, 7:16 pm Vincent Post #1



Here is a detailed explanation of what is going on in my map.

Player 1 and Player 2 [Or any other combination] enter the end of level 1 at the same time. Causing the level 2 trigger to fire twice. Making 2 level 2 units instead of just making the normal 1 unit.

How can I make it so if 2 players enter the end of level 1 it doesn't fire the level 2 trigger twice?

If you can help me make a work around like if player '1-12' has 2 units in 'whole field' kill 1 unit.

Post has been edited 2 time(s), last time on Aug 18 2010, 10:00 pm by Vincent.



None.

Aug 18 2010, 7:24 pm shmeeps Post #2



Add this condition into the "Conditions" section of the trigger(s) in question:

Code
Actions Queue is Empty == true


and I believe this will work too

Code
(Number of times (Current trigger) has been executed) == 0




None.

Aug 18 2010, 7:32 pm payne Post #3

:payne:

Quote from shmeeps
Code
Actions Queue is Empty == true
I don't understand this one...
I'd interpret it as "# Actions left to trigger: none", thus making me tend to say to set it to 'false'. :O



None.

Aug 18 2010, 10:05 pm shmeeps Post #4



Hmm, I thought it was number of times the trigger is queued to run, but I suppose what you said makes more sense.



None.

Aug 18 2010, 10:14 pm TheFreak Post #5



How about "Turn (current trigger) off" as the last action?

if you don't need the trigger anymore, it should work.

~TheFreak



None.

Aug 18 2010, 10:16 pm Vincent Post #6



Quote from TheFreak
How about "Turn (current trigger) off" as the last action?

if you don't need the trigger anymore, it should work.

~TheFreak

I've tried this, the best is to use shmeeps 2nd option.

[SOLVED]



None.

Aug 18 2010, 10:31 pm shmeeps Post #7



Quote from TheFreak
How about "Turn (current trigger) off" as the last action?

if you don't need the trigger anymore, it should work.

~TheFreak
I believe the problem with this is that, if in the rare case that the two units cause the trigger to run side by side, most, if not all of the actions will still be run twice. I'm not sure if turning off the trigger even stops all running instances of it either.



None.

Aug 19 2010, 12:48 am TheFreak Post #8



Err I meant First instead of "last".

@shmeeps: No, turning off a trigger only makes it not respond to events. It still executes all the remaining actions in all running instances.

also (Number of times (Current trigger) has been executed) == 0 would suffer exactly the same in those rare cases.

~TheFreak



None.

Aug 19 2010, 3:09 am payne Post #9

:payne:

If the actions triggers two times, what about adding a prevention-trigger that would increment 1 to "x" for every time the trigger is set.
If ever you detect that x == 2, you fix the glitch.



None.

Aug 19 2010, 3:26 am TheFreak Post #10



You could do it within the same trigger. It would cost you an extra global variable but it would work.

~TheFreak



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:40 am]
Oh_Man -- true
[2026-7-23. : 3:16 am]
RIVE -- Still annoyed there was never a trigger to stop or pause wavs.
[2026-7-23. : 1:40 am]
Oh_Man -- tthen u come to SCBW and it's like - upload WAV, play WAV.... sigh why cant it be that easy
[2026-7-23. : 1:40 am]
Oh_Man -- and no consistent easy to use way to then play the audio either
[2026-7-23. : 1:39 am]
Oh_Man -- where they use third party audioprogram called WWISE which basically makes adding audio extremely difficult
[2026-7-23. : 1:39 am]
Oh_Man -- i appreciate SCBW's ability to just let us upload and play WAVs so much compared to nightmare that is total war warhammer 3
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
Please log in to shout.


Members Online: Zycorax