Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: I have a problem with Wait and Countdown
I have a problem with Wait and Countdown
May 11 2009, 6:03 pm
By: LhaN  

May 11 2009, 6:03 pm LhaN Post #1



Hi, I'm again jejeje. I have a problem with timers. Many of my triggers uses an Action Wait. One of them uses a Countdown timer.
The countdown is set 45 second. Next action: wait 45000 milisecond. And next action is Preserve trigger. But the countdown is not initialized at end of previus. If put wait 5000 milisecond, the countdown inicialice at 25 seconds, with wait 10000, at 20s, with 20000 at 9s...11s. The question is... the other wait in other triggers affect my Preserve Action later of the countdown??? The number of triggers affect the trigger of the countdown???



None.

May 11 2009, 6:43 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

What's the point of having a wait in a trigger resetting a countdown timer?
Just make a separate trigger that sets it to 45 when the countdown reaches 0.

Quote from LhaN
I have a problem with timers. Many of my triggers uses an Action Wait.
This is most probably the reason for the odd wait behavior. You're encountering Wait Blocks. Replace all your waits with death counters. Just like in Desert Strike - it doesn't use a single wait. ;)
Read the wiki for more info on wait blocks and death counters.




May 16 2009, 11:41 pm LhaN Post #3



I read the wiki but I can't make a countdown that restart over with 45 seconds again. Between countdown have a pause of 20 seconds... =(
I use nexts triggers:

Quote
  • For Neutral Player 12 (he have a startlocation in map)
  • Condition Always
  • Action:
    • comment Hyper.
    • Preserve trigger.
    • Wait 0 milisecond.

And...

Quote
  • For Neutral Player 1 and 2
  • Condition Always
  • Action:
    • Modify Countdown Timer: Set to 45 seconds.
    • Wait 45000 milisecond.
    • Preserve trigger.

What is the problem? Someone can tell I'm doing wrong?



None.

May 17 2009, 12:05 am Falkoner Post #4



Actually, I think the issue is that countdown timers are based on in-game time, and waits are the same no matter what speed you're on. So you should instead do what Nude said, have another trigger that sets the Countdown timer to 45 if it's at 0, that will work better than a wait.

Oh, also, only players 1-8 can have triggers, any other triggers just don't run, so your hypertriggers are doing nothing. Also, it isn't just hypertriggers that cause wait blocks, it's other waits as well.



None.

May 17 2009, 12:35 am LhaN Post #5



Ok... I modify triggers:
Quote
  • For Player 1 (Computer)
  • Condition Always
  • Action:
    • comment Hyper.
    • Preserve trigger.
    • Wait 0 milisecond.
    • Up to 62 waits... (I skiped in my previous post sorry.)

And...

Quote
  • For Player 2 and 3 (Humans)
  • Condition Always
  • Action:
    • Modify Countdown Timer: Set to 45 seconds.
    • Wait 45000 milisecond.
    • Preserve trigger.

No changes. 20 seconds pause between countdowns, and the game speed is 7... Where I can find a example map with hypers???



None.

May 17 2009, 4:49 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

hypers: copy that first trigger 2 more times

To reset the countdown timer have this:

coundown timer is 0
Set countdown to 45

stop using waits. Transform them into death counts instead. 1 death count = 83.333 ms on fastest. 1 death count = 133.333 ms on normal (game/countdown speed). Use that as your conversion factor. There are few things that wait can do better than death counts, and death counts are much more accurate.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 17 2009, 6:34 am Falkoner Post #7



Don't use Waits at all, do as has now been said 3 times, add a trigger that resets the timer when it reaches 0!



None.

May 17 2009, 7:38 pm LhaN Post #8



Ok... I understand. I changed the triggers, all for Player 1:
Quote
  • Condition: Always.
  • Action
    • Modify death counts for Player 1: Set to 540 for Cantina.
    • Modify death counts for Player 1: Set to 12 for Cave.
    • Modify Countdown Timer: Set to 45 seconds.

Quote
  • Condition: Player 1 has suffered at most 1 deaths of Cantina.
  • Action
    • Modify death counts for Player 1: Set to 540 for Cantina.
    • Modify Countdown Timer: Set to 45 seconds.
    • Preserve trigger.

Quote
  • Condition: Player 1 has suffered at most 1 deaths of Cave.
  • Action
    • Modify death counts for Player 1: Set to 12 for Cave.
    • Modify resources for Player 2: Add 10 ore.
    • Modify resources for Player 3: Add 10 ore.
    • Preserve trigger.


Quote
  • Condition: Player 1 has suffered at least 1 deaths of Cantina.
  • Action
    • Modify death counts for Player 1: Substract 1 for Cantina.
    • Preserve trigger.

Quote
  • Condition: Player 1 has suffered at least 1 deaths of Cave.
  • Action
    • Modify death counts for Player 1: Substract 1 for Cave.
    • Preserve trigger.

Quote from 4 Times...
  • Condition: Always.
  • Action
    • Coment: Hyper.
    • Preserve trigger.
    • Wait for 0 milliseconds. (Up to 62...)
      ...

And... is not working... What it's wrong!!!??? Have a pause of 20 seconds between countdowns. I do not want to use the condition countdown timer is 0. The countdown 45 seconds is just an example of something that occurs every X seconds... One thing I can see and controling, when occurs. Thanks for your patience.



None.

May 17 2009, 7:55 pm rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

It's working fine. You used the wrong number. 45/.13333333333333=338. 45/.08333333333333=540. Use 338.

Now, if you play on normal speed, it will be 45 seconds. if you play on fastest, it will be 28.1 seconds. Choose which speed you want to play at--Real time or game time. The countdown timer plays on game time.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 18 2009, 5:32 am LhaN Post #10



Mmmm... I play on speed 7... you tell me:
Quote from Zachary Taylor
1 death count = 83.333 ms on fastest. 1 death count = 133.333 ms on normal
I use 540, but I need use 338... so, I need to keep the ratio of game time / death count speed, without considering the real time. For real 45 seconds in fastest speed I should use 0.0833... but for 45 seconds game in fastest speed I should use 0.1333. So finally I understood. Thank you all.



None.

May 19 2009, 3:28 am Falkoner Post #11



OMGOSH! How many times do we have to tell you!? You don't need waits, you don't need Death Counts, all you need is a simple trigger to reset it!

Code
Conditions:
Countdown timer is Exactly 0 game seconds
Actions:
Modify Countdown Timer: Set to 45 seconds.
Preserve Trigger


Much simpler!



None.

May 24 2009, 5:36 pm LhaN Post #12



Yes... I know... but if I need 7 countdowns??? countdown trigger is general for all. Anyways thanks. The problem is solved.



None.

May 24 2009, 9:10 pm rockz Post #13

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Falkoner
OMGOSH! How many times do we have to tell you!? You don't need waits, you don't need Death Counts, all you need is a simple trigger to reset it!

Code
Conditions:
Countdown timer is Exactly 0 game seconds
Actions:
Modify Countdown Timer: Set to 45 seconds.
Preserve Trigger


Much simpler!
He was using the countdown timer as a stop watch and noticed wait(45000) wasn't 45 seconds on the countdown.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

May 25 2009, 1:06 am Falkoner Post #14



I did answer that:

Quote
Actually, I think the issue is that countdown timers are based on in-game time, and waits are the same no matter what speed you're on. So you should instead do what Nude said, have another trigger that sets the Countdown timer to 45 if it's at 0, that will work better than a wait.

However, yes, I misunderstood, I thought he was specifically talking about the countdown timer.



None.

May 25 2009, 11:43 am LhaN Post #15



Quote from LhaN
I do not want to use the condition countdown timer is 0. The countdown 45 seconds is just an example of something that occurs every X seconds... One thing I can see and controling, when occurs. Thanks for your patience.

It's ok, no problem, thanks anyway. I did not know about the trigger for countdown, jeje. Now... I know.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: DarkenedFantasies, JohnnyTheWolf