Will the trigger repeat or stop?

MissKerrigan

Active Member
Reaction score
23
Hi there,

I created a trigger with the next actions:

repeat actions (forever)
+
- create 8 zerglings for player '2' on center of 'computer player'
- wait 60 seconds

My question is:

When I turn off the trigger by another trigger, does the trigger stops then or continue because it was set on repeat forever?


MissKerrigan
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
the trigger will continue, turning off the trigger causes it to not fire again

so if it fires off some event normally, it will stop firing off that event, but ones that are currently running will continue... you can stop them by using a while loop of a boolean variable saving whether the trigger is on or off
 

MissKerrigan

Active Member
Reaction score
23
I just found out that I can stop trigger action by adding a trigger action called 'stop all instance of trigger'

Please don't try to set me up with variables which I have no any understanding off and absolutely don't say that I don't want to learn something while I just try to understand it...
 

X-maul

AKA: Demtrod
Reaction score
201
Ok, if you actually DO want to learn it, I will tell you:
You will have to use a variable of type: Boolean.
A Boolean varaible can hold only 2 values: False or True. Which you can use for many different things. (You could also use an integer and only use 1 and 2 (instead of true and false)).
So you use this variable as a condition:
You have a trigger that will give some minerals to a player if their hero is alive.
You then have a trigger that, if a players hero dies, will set a Boolaen variable (We call it "IsPlayerHeroDead") and set it to true when the hero dies (and false when it is revived). So in the first trigger the the condition will be:
"IsPlayerHeroDead is equal to True"

Hopefully this makes sense.

For your problem:
You will have to create a GLOBAL Boolean variable, name it "CreateZerglings". Then you set a condition in your spawning trigger that looks like this:
"CreateZerglings is equal to True"
In the trigger that would turn off the trigger (It should not do that now) instead it should now set the "CreateZerglings" variable to False.
(If this should work for all players, you set the variable to have an array size of 15 and use "Player number of triggering player" to get the right variable array)
 

MissKerrigan

Active Member
Reaction score
23
Thanks for you explanation, but I already sais I got it by the 'stop all instance of trigger' action

I see your 'create zerglings' explanation but I'm still missing the thing which send them every 60 seconds

I just do it by the easy way insead of making this variable/boolan/global things
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top