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.
[2024-6-03. : 9:44 pm]
NudeRaider -- can confirm, staff is terrified of Devlin
[2024-6-03. : 3:33 pm]
Vrael -- I see Devlin has been up to some shenanigans lately
[2024-6-03. : 3:33 pm]
Vrael -- https://i.imgur.com/x3qes5W.jpeg
[2024-6-02. : 5:47 pm]
Ultraviolet -- zsnakezz
zsnakezz shouted: ultra you have any thought or notes on undead invasion?
I still haven't gotten a chance to play it yet unfortunately. I just downloaded, but today I'm working on a project with a deadline so won't be able to play it today
[2024-6-02. : 4:59 am]
zsnakezz -- >:)
[2024-6-02. : 4:59 am]
zsnakezz -- :)
[2024-6-02. : 4:58 am]
zsnakezz -- somebody gets it
[2024-6-02. : 4:58 am]
zsnakezz -- and its not all just numbers in my file screen
[2024-6-02. : 4:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[2024-6-02. : 4:57 am]
zsnakezz -- just kidding
Please log in to shout.


Members Online: Ultraviolet, Roy, IlyaSnopchenko