| 03-27-2009, 05:30 PM | #1 |
so, I was reading through this guide: http://www.wc3c.net/showthread.php?t=92275 and it helped me alot, I got through the basics no biggie except for the one part, my timer window won't get destroyed. They just keep stacking up. I've got it all set up like this: Wave start: Trigger: ![]() Events:
![]() Game time elapsed is 0.00 seconds.
![]() Conditions:
![]() N/A
![]() Actions:
![]() Countdown Timer - Create a timer window for GameStart with the title First wave in:
![]() Set GameStartWindow = (Last created timer window)
![]() Countdown Timer - Start GameStart as a One-Shot timer that will expire in 45.00 second
![]() Countdown Timer - Show (Last created timer window)
![]() Trigger - Turn on (In Between)In Between waves: Trigger: ![]() In Between
![]() Events:
![]() Player - Player 12 (Brown)'s Food used becomes Less than 1.00
![]() Conditions:
![]() N/A
![]() Actions:
![]() Countdown Timer - Destroy (Last created timer window)
![]() Countdown Timer - Create a timer window for InBetween with title Next level in:
![]() Set InBetweenWindow = (Last created timer window)
![]() Countdown Timer - Start InBetween as a One-shot timer that will expire in 15.00 seconds
![]() Countdown Timer - Show (Last created timer window)My plan here was that after the first triggers timer expires, it would turn on the trigger "In Between" that would start reacting as soon as Player 12's (my 'creepmaker') food used got under 1, basically when all the creeps were dead. When this happened it would create a new timer that would act as a "in between levels" timer, telling players how long they will have until the next wave. Problem 1: Timer window won't dissapear. My next issue is with the triggers In Between shown above and this one: Trigger: It's supposed to spawn 20 creeps total the first wave, but just keeps spamming wave after wave after wave of level 1 creeps. My question is: How do I correct this, since it just won't work like I want it to. |
| 03-27-2009, 06:36 PM | #2 |
Never ever ever ever ever use waits in loops. It's an absolute no-no. Also, what is defining Amount[Level]? And you have the Destroy Window command in the wrong trigger, it needs to be in the trigger where the timer expires, not when he runs out of food. Also, if you're setting a variable to the timer window, then use it. Have it destroy the variable timer window, not last created. |
| 03-27-2009, 06:39 PM | #3 | ||
Quote:
Why not? Quote:
Amount is a variable for the amount of creeps to spawn for every different level, level is well... level, when the level reaches 10 for example, a boss spawns, so therefor amount gets set to 1. Thanks for the timer thing, I'll check it out |
| 03-27-2009, 06:42 PM | #4 |
For the timer ShadowWolf is right, just make 1 trigger with the two you have and between the actions of the first and the actions of the second one put a Wait Until Condition, with the 2nd event as the condition, so: Wait Until ((Food of Player 12 (Brown)) is equal or below 0) Or.. set a variable for the Timer Window as ShadowWolf pointed And: Waits make loops stop. |
| 03-27-2009, 11:19 PM | #5 |
>Waits make loops stop. No they don't. Waits work just fine in loops. It just isn't wise to do so in GUI loops because Integer A/B is a global and can easily be overwritten by any other loops that run at the same time. This could cause some... interesting bugs. |
| 03-28-2009, 02:45 AM | #6 |
Waits make ForGroup/ForForce/timer callbacks stop. Not integer loops. |
