Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Messed up wait in triggers?
Messed up wait in triggers?
Sep 9 2008, 9:51 pm
By: LooKe  

Sep 9 2008, 9:51 pm LooKe Post #1



Ok, so I have wait actions in my triggers, that don't seem to be working right. Here is one of my triggers that isn't working:

trigger


it's supposed to wait for 1000 milliseconds, but it actually ends up waiting 40 seconds...



None.

Sep 9 2008, 9:58 pm Echo Post #2



Do you have hyper triggers on? If so, it's going to be a problem because of waitblocks. I suggest you replace "waits" with "death counter timer" or a maybe even a physical timer.



None.

Sep 9 2008, 11:20 pm Roy Post #3

An artist's depiction of an Extended Unit Death

Quote from name:
Do you have hyper triggers on? If so, it's going to be a problem because of waitblocks. I suggest you replace "waits" with "death counter timer" or a maybe even a physical timer.
Agreed 100%.

Looking at the trigger, it doesn't seem like you really need a "wait" at all... Oh well, there's probably a reason :P

Whenever you have a trigger like this you would want to use a death counter, because it repeats after a single wait. Therefore you don't even have to split the trigger.

I don't recognize your name, so I'll assume that you would like to see an example of using a death counter.

triggers


Eh, I don't usually use text-based triggering, so the format might be off a bit... But you get the idea, I hope :P
1 second = ~11.5 deaths

Note that "~" means "about" as I have not personally timed this, but I have heard it range from 11 to 12 deaths for one second. Falkoner's guide says 11.8.

Post has been edited 2 time(s), last time on Sep 10 2008, 2:17 am by Roy.




Sep 10 2008, 1:16 am Echo Post #4



I thought it was 12 deaths = 1 seconds :omfg:



None.

Sep 10 2008, 2:17 am InsolubleFluff Post #5



isn't 12 deaths 11.5 deaths rounded up so not a significant differene :/?



None.

Sep 10 2008, 2:31 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

do the math. hyper triggers run every 84 ms on fastest. That's the most accurate way.

Oh, and you're experiencing wait blocks. A player can't run more than 2 waits at a time, or else the waits get added together. If you have hyper triggers above normal triggers, any trigger with a wait after the triggers will get an infinite wait block. Make sure you don't have any other waits, and good mapmaking completely ignores waits outside of wait blocks, except when playing a song. Use death counts instead. Check the wiki for everything you could possibly want to know.



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

Sep 10 2008, 3:45 am Fwop_ Post #7



You don't even need waits for songs. You should just get into the habit of using any timer or wait as a death counter. Death counters are you best friend in map making, make them your companion cube. [<3]

It's 11.9 anyway. Just do a test map, or (omg!) do 1000 / 84 (I think this value is slightly different than what you would get if you sat in a game for ten thousands seconds adding resources, but it doesn't matter).



None.

Sep 10 2008, 3:57 am LooKe Post #8



Dang it! but also, Thank you!

I just recently got back into mapping so this helped alot.



None.

Sep 10 2008, 5:42 am Falkoner Post #9



They run at exactly 8 loops per in-game second, well not exactly:
Collapsable Box


But close enough, you'll definitely want to start using Deaths instead of waits, while they are half as precise, avoiding wait blocks makes it much more worth it, and they generally make your map much more flexible and easy to work with.

Post has been edited 1 time(s), last time on Sep 12 2008, 1:14 am by Falkoner.



None.

Sep 10 2008, 8:32 am rockz Post #10

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Fwop_
You don't even need waits for songs.
Waits round up to the nearest 42 ms, whereas death counts round up to the nearest 84. That's the only reason I'd ever use waits outside of hyper triggers.



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

Sep 10 2008, 12:22 pm Fwop_ Post #11



But do you really need to be that accurate to use waits? I guess it's just me, I like to stay on the safe side.



None.

Sep 10 2008, 12:38 pm NudeRaider Post #12

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

Quote from Falkoner
They run at exactly 8 loops per in-game second, well not exactly:
Collapsable Box


But close enough, you'll definitely want to start using Deaths instead of waits, while they are half as precise, avoiding wait blocks makes it much more worth it, and they generally make your map much more flexible and easy to work with.
Don't compare real time with game time.
When you always add 1 ore for 1000 game seconds (with wait(0) hypertriggers) then you get exactly 8000 minerals in that time and 682 real time seconds will pass (on fastest).
That means the triggers run ~11.73 times per real time second (= 1 trigger loop takes exactly 85.25ms)
and exactly 8 times per game second. There is no .007 deviation.

Check the map I tested this with:




Sep 10 2008, 8:52 pm Madroc Post #13



Quote from Falkoner
They run at exactly 8 loops per in-game second, well not exactly:
Collapsable Box


But close enough, you'll definitely want to start using Deaths instead of waits, while they are half as precise, avoiding wait blocks makes it much more worth it, and they generally make your map much more flexible and easy to work with.

I don't really understand the table. Could you explain in better detail? This seems like it could be the solution to one of my projects where I need to know the exact length of 1 trigger loop in Fastest. Or is this not what your post is about? I might just be confused.\

Edit Wait nevermind I should have read NudeRaider's post. Nevermind sorry.



None.

Sep 11 2008, 11:48 pm LooKe Post #14



Ok, So I tried this out, and it turns out that it only subtracts 1 death every 2 seconds... (hence the such small amount of needed deaths)
That is the only trigger player 5 has (unless triggers using "all players" counts as his)...I'm just curious if it makes a difference having to use 30 instead of like 708 deaths.

relevant triggers




None.

Sep 12 2008, 12:39 am Fwop_ Post #15



To get the speed that they are talking about, you need to use hyper triggers. omg link!

Hmm... well I see you got some in there, but put the hyper trigger (also copy it like 3 more times) to a computer player so you don't have any problems with wait blocks or no hypers at all.

And yes, it does make a difference if you use 30 instead of 708. Think of the values you put in for the death counters as time. The more there is, the more time it will take to reach 0.



None.

Sep 12 2008, 12:54 am Falkoner Post #16



Quote
When you always add 1 ore for 1000 game seconds (with wait(0) hypertriggers) then you get exactly 8000 minerals in that time and 682 real time seconds will pass (on fastest).
That means the triggers run ~11.73 times per real time second (= 1 trigger loop takes exactly 85.25ms)
and exactly 8 times per game second. There is no .007 deviation.

I think you're in the same boat as DTBK, you don't understand the table.

Code
2 Seconds:
Milliseconds: 0 Number of runs: 15
Milliseconds: 42 Number of runs: 15
Milliseconds: 43 Number of runs: 10

3 Seconds:
Milliseconds: 0 Number of runs: 31
Milliseconds: 42 Number of runs: 31
Milliseconds: 43 Number of runs: 21

11 Seconds:
Milliseconds: 0 Number of runs: 87
Milliseconds: 42 Number of runs: 87
Milliseconds: 43 Number of runs: 58

61 Seconds:
Milliseconds: 0 Number of runs: 487
Milliseconds: 42 Number of runs: 487
Milliseconds: 43 Number of runs: 325

1001 Seconds:
Milliseconds: 0 Number of runs: 8007
Milliseconds: 42 Number of runs: 8007
Milliseconds: 84 Number of runs: 5338
Milliseconds: 85 Number of runs: 4004


This table proves many many things about how SC works while using hypertriggers:
1. Starcraft runs through 1 trigger loop before starting the Elapsed Time timer.
2. Starcraft runs 8 loops per in-game second, with hypertriggers with waits of 42 and under
3. Wait times are rounded to the next greatest multiple of 42, which is why 0 and 42, when put into the waits in hypertriggers, give the same number. You can also notice that 43 gives the same as 84, but 85 gives a different value.


Nude, I the map you posted is exactly the way I was testing. And it's quite simple to compare it with real-time, as Fastest runs at 1.5x real speed.

Post has been edited 2 time(s), last time on Sep 12 2008, 1:13 am by Falkoner.



None.

Sep 12 2008, 1:00 am Fwop_ Post #17



Are you doing something like at least 0 game time elapsed? Because I hope you know hyper triggers don't work for the first cycle. Also, at least 0 and at most 100 is 101 seconds, not 100. You WILL have exactly 8000.

Besides, your chart has data that doesn't make sense. You claim to have 15 loops in 1 seconds? I wish my triggers would run that fast.



None.

Sep 12 2008, 1:03 am Falkoner Post #18



The seconds above are what I put in the elapsed, though you do make a point with the at most, which shows that it starts the elapsed timer 1 loop before the loops start running(if that makes sense) so it actually give 7999, not 8000.

If it does give 8000(maybe it does, I don't want to spend 1000 seconds watching Nude's map), if it does, then that brings up another question, why did I get 8007 loops, with 1001?



None.

Sep 12 2008, 1:05 am Fwop_ Post #19



Try your test with at least 11 seconds to 110 seconds. Need to realize that at least 1 to at most 2 is two seconds.



None.

Sep 12 2008, 1:06 am Falkoner Post #20



Sorry, edited right before you posted, I realize I mixed that up, but at the same time, it makes another question arise:
Quote
If it does give 8000(maybe it does, I don't want to spend 1000 seconds watching Nude's map), if it does, then that brings up another question, why did I get 8007 loops, with 1001?
Maybe it means that it runs a little less than 8 times a second, but that's not certain.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy