Hi, I am working on a practice map that spawns groups of units on a timer. The problem is that the units spawn in 25 seconfd increments and I want to set conditions where they will not spawn below a minimum and above a max time.
The problem happens when the minimum time exceeds the wait times (in this case 25 seconds.
It seems the wait timers are conflicting with the conditions of a min and max time.
Very confused any help would be appreciated.
I've uploaded the map fil, as the code is blurry from the photobucket file.
I'm not 100% clear on your problem. I think it's your really long named trigger, right?
If so, I'm pretty sure the problem with that is that a while loop is active while the conditions are true, then it turns off for good. So your conditions were already bad when they were first checked. (The missions time was 25 which was under the 60 game time condition.)
I changed that trigger around a bit, and it seems to be working. A while loop would probably still work with the way I changed the event, but I'm kind of used to using if then statements within repeated loops.
Yes, your code worked nicely using the If Then Else statement.
I just recently got an itch to make training maps, and have been learning the editor flying by the seat of my pants.
I'd like to understand why the original code failed. If I'm understanding you, the timer was at 25 when it checked the condition (while greater than 26 and less than 180) and never ran. Now it makes sense.
Thanks for clearing that up. I have alot to learn. And I hope this post helps someone in the future.
Yea, triggers are fun, but there's definitely a lot of trial and error :)
One lesson I learned somewhat early on was that everything is executed in order (Actions in a trigger, and also if you have two triggers with the same event, then the one higher up on the list goes first). I put a 'turn trigger off' action after a wait action, instead of at the very beginning and ended up with a trigger going 10 or so times when I only wanted it to play once xP (So many nydus worms, haha)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I am working on a practice map that spawns groups of units on a timer. The problem is that the units spawn in 25 seconfd increments and I want to set conditions where they will not spawn below a minimum and above a max time.
The problem happens when the minimum time exceeds the wait times (in this case 25 seconds.
It seems the wait timers are conflicting with the conditions of a min and max time.
Very confused any help would be appreciated.
I've uploaded the map fil, as the code is blurry from the photobucket file.
I'm not 100% clear on your problem. I think it's your really long named trigger, right?
If so, I'm pretty sure the problem with that is that a while loop is active while the conditions are true, then it turns off for good. So your conditions were already bad when they were first checked. (The missions time was 25 which was under the 60 game time condition.)
I changed that trigger around a bit, and it seems to be working. A while loop would probably still work with the way I changed the event, but I'm kind of used to using if then statements within repeated loops.
@MaskedImposter: Go
Yes, your code worked nicely using the If Then Else statement.
I just recently got an itch to make training maps, and have been learning the editor flying by the seat of my pants.
I'd like to understand why the original code failed. If I'm understanding you, the timer was at 25 when it checked the condition (while greater than 26 and less than 180) and never ran. Now it makes sense.
Thanks for clearing that up. I have alot to learn. And I hope this post helps someone in the future.
Yea, triggers are fun, but there's definitely a lot of trial and error :)
One lesson I learned somewhat early on was that everything is executed in order (Actions in a trigger, and also if you have two triggers with the same event, then the one higher up on the list goes first). I put a 'turn trigger off' action after a wait action, instead of at the very beginning and ended up with a trigger going 10 or so times when I only wanted it to play once xP (So many nydus worms, haha)