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.
[08:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
[2024-5-09. : 11:31 pm]
Vrael -- :wob:
[2024-5-09. : 8:42 pm]
Ultraviolet -- :wob:
[2024-5-08. : 10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[2024-5-08. : 10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
Please log in to shout.


Members Online: 1charlottec4485fB6, C(a)HeK, SPyro_Malin