| Wormer | May 12 2008, 6:50 pm | Post #1 |
|
Could someone, please, tell me how waits and hypers work? I know that when SC encounters a wait it will first check all other triggers and execute the wait only after that. Mabe I even know a bit more... but I can't sum up everything I know... There is still some uncertanity. I want to know exactly the whole picture in all details how they are working.
Is there someone who could describe me the behaviour of waits and hypers in all details? No incompleteness, please, only strict description. Thanks. BTW, in wiki I found only description of how to make hypper triggers, however there is nothing said how it works (at least Maplantis one, SEN wiki seem not to work at the moment). Edit: |
||
|
This post was edited 1 time, last edit by Wormer: May 20 2008, 11:53 am.
![]() |
| (U)devilesk | May 12 2008, 6:57 pm | Post #2 |
|
Classic
|
This is what I posted before in another topic:
|
||
![]() Re: Will Maphack be allowed in SC2? for LAST TIME MAPHACK IS NOT CHEAT. is ROCKET BOOSTER INTO SPACE CHEAT? ROCKET BOOSTER INTO SPACE MAKE SPACE TRAVEL EASIER BUT NOT CHEAT. THEREFORE, MAPHACK IS NOT CHEAT. WOW YOU PEOPLE ARE STUPIDS!!!! While playing Soldat: Bravo Team Member: staying two seconds at one place is not camping.. Alpha Team Member: ya.. and putting ur cock into a vag is not sex |
| Wormer | May 12 2008, 7:04 pm | Post #3 |
|
Ah, yes... I remember I had questions though... Well... sorry, all questions a bit later
|
||
![]() |
| Falkoner | May 12 2008, 9:51 pm | Post #4 |
|
Taking StarCraft Map Making to the Limit!
|
Hyper Triggers are just a whole crapload of waits, as short as possible, which is 42 milliseconds, or usually put as 0. The waits all run, and they all get stacked up, and every time one ends, a new one starts 42 milliseconds later and updates the entire trigger list while it's at it. So you get updating every 84 milliseconds.
|
||
| NudeRaider | May 13 2008, 1:03 am | Post #5 |
|
Write your own destiny, or else someone will write it for you!
|
I'm not sure if Falk means the right thing, so I'll clarify:
The smallest wait time is 84ms, which seems to be some built-in minimum wait time. From 84ms you can increment the wait times in 42ms steps. So the 2nd smallest wait time is 126, then 168, etc. That means waits can be used to time events with double the accuracy than you'd be able using death counters and hypers. The Maplantis wiki article also contains an explanation about what waits do when you scroll down: http://www.staredit.net/maplantis/index.php?sid=03b8dbddda;wiki=6#wiki_4 Wait blocks occur when one player is executing 2 waits the same time. So obviously you should avoid waits when you're using hyper triggers. However there's 3 strategies how you can use hypers and waits: - Give the hypers to a single player which has no other waits (obvious) - Give the hypers to all players and place them at the bottom of the trigger list. The hypers of one player will be blocked when he runs a wait, but the wait will run correctly. The other players' hypers ensure that the hyper trigger effect is still working if not all players run a wait the same time. If they do all run a wait, the wait itself will run correctly but the hyper trigger effect is offline until the wait ends. - Use switched hypers (see ML wiki) to temporarily switch off hypers via an additional switch. (Unlike common hypers, switched hypers end as soon as the condition is no longer met) In the old Tutorials of SEN v4 there was a very detailed explanation how hypers work and in which order the actions are executed. I reformatted my PC and thus lost my link to Doodle's Tutorials which, when I remember correctly, contained this explanation. I'll try to dig it out for ya, or maybe Falk can link you to it. EDIT: There it is: http://doodle77.dyndns.org/tutorials.php?id=128 |
||
|
This post was edited 1 time, last edit by NudeRaider: May 13 2008, 2:54 am.
|
| Falkoner | May 13 2008, 4:02 am | Post #6 |
|
Taking StarCraft Map Making to the Limit!
|
Wrong, the shortest wait time is 42, not 84. Proof: 1000 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 It's just that the trigger looping causes an extra 42 milliseconds to be added, giving you once every 84 milliseconds. |
||
| Wormer | May 13 2008, 10:18 am | Post #7 |
|
What would be the particular order of executing wait actions I've labeled:
CodeExample 1. TRIGGER T1 Owners: Player 1. Conditions: Always. Actions: A11: Wait 0 milliseconds. A12: Wait 0 milliseconds. Preserve trigger. END T1 TRIGGER T2 Owners: Player 1. Conditions: Always. Actions: A21: Wait 0 milliseconds. Preserve trigger. END T2 If we assume, when encountering a wait, all triggers (excluding those of them which execute at the moment) are previously checked and this is stacked for different waits the sequence must be like this: ( T1( /* before A11 get executed we check all other triggers first */ T2(A21), A11, T2(A21), A12), T2(T1(A11, A12), A21) ). I mean sequence of actions (A21, A11, A21, A12, A11, A12, A21) with an additional information about what trigger SC remembers to be executing at the moment. But there are 7 waits executing instead of predicted 6 by http://doodle77.dyndns.org/tutorials.php?id=128. Where am I wrong? |
||
|
This post was edited 7 times, last edit by Wormer: May 13 2008, 4:08 pm.
![]() |
| NudeRaider | May 13 2008, 1:25 pm | Post #8 |
|
Write your own destiny, or else someone will write it for you!
|
Which triggers did you make that resulted in this?
Also which speed did you use and is it 1000 game seconds or real-time seconds? |
||
| Wormer | May 13 2008, 4:14 pm | Post #9 |
|
BTW, thanks for the link Nude! I also remember this description. I was reading it back in days... though, didn't understand it quite well.
|
||
![]() |
| Wormer | May 13 2008, 5:52 pm | Post #10 |
|
If SC is rechecking triggers from the beginning when wait is met, how could you explain the next test is creating only one marine?
CodeTest 1
//-----------------------------------------------------------------// Trigger("Player 1"){ Conditions: Switch("Switch1", not set); Actions: Preserve Trigger(); Create Unit("Current Player", "Terran Marine", 1, "Anywhere"); } //-----------------------------------------------------------------// Trigger("Player 1"){ Conditions: Always(); Actions: Preserve Trigger(); Wait(0); } //-----------------------------------------------------------------// Trigger("Player 1"){ Conditions: Always(); Actions: Set Switch("Switch1", set); } //-----------------------------------------------------------------// |
||
![]() |
| NudeRaider | May 13 2008, 5:57 pm | Post #11 |
|
Write your own destiny, or else someone will write it for you!
|
Afaik all other player's triggers are rechecked. Not the ones of the same player.
|
||
| Wormer | May 13 2008, 6:21 pm | Post #12 |
|
How then we get that exponential growth with classic hyper triggers? And further, reasoning that way we should conclude that the hyper triggers owners' triggers are still executeing one time in two game seconds, which, we know, is not like that.
|
||
|
This post was edited 1 time, last edit by Wormer: May 13 2008, 6:27 pm.
![]() |
| NudeRaider | May 13 2008, 7:53 pm | Post #13 |
|
Write your own destiny, or else someone will write it for you!
|
Now that you mention it, I remember that I was once told that the current player's trigger BELOW the wait are also checked.
Should explain everything... |
||
| Wormer | May 20 2008, 11:47 am | Post #14 |
|
It seems I began to subconsciously understand how it works... but if one asks me I still would not be able to describe the algorithm.
I wonder, could somebody there distinctly describe the percise algorithm of how SC behave when it hits the wait? The devilesk's description is not right at least beacause of this. Well, lets have a little competition! I'll give 50 minerals to that person who first will intelligiblely explain me (which means povideing the percise algorithm at least) how the whole system with waits works before I figure it out myself.Head topic is edited. |
||
|
This post was edited 1 time, last edit by Wormer: May 20 2008, 11:53 am.
![]() |
| |
May 20 2008, 3:25 pm | Post #15 |
|
Quis custodiet ipsos custodes?
|
My expanation is incorrect.
|
||
![]() [11:59:05] devilesk: make some allusions to literature [11:59:48] devilesk: make it subtle [12:02:13] Moose: I don't need or want to be told how to make clues. [12:02:19] devilesk: im not telling [12:02:21] devilesk: i'm suggesting [12:05:11] devilesk: it doesn't look like a command [12:05:12] devilesk: sound like one |
| Falkoner | May 20 2008, 10:37 pm | Post #16 |
|
Taking StarCraft Map Making to the Limit!
|
It's game seconds, and I did it at fastest, to test I simply had a trigger: If elapsed game time is at most x(in this case 1000 seconds) Set Minerals for P1 +1 Preserve Trigger I always imagined it that every single trigger runs when it hits a wait, since otherwise hypertriggers wouldn't work so well unless at the bottom of the list, I imagine that when a wait is hit, every trigger after the wait is run, then all triggers ahead of the wait are run. Other than that, the theory about wait stacking seems correct. |
||
| NudeRaider | May 21 2008, 1:21 am | Post #17 |
|
Write your own destiny, or else someone will write it for you!
|
Where's the wait? Did use hypers? Which value had the wait in the hypers?
|
||
| Falkoner | May 21 2008, 1:31 am | Post #18 |
|
Taking StarCraft Map Making to the Limit!
|
The Wait was the wait time inside the hypertriggers.
|
||
| DT_Battlekruser | May 21 2008, 1:36 am | Post #19 |
|
I paid eleven minerals for THIS?
|
To add a small piece to the puzzle: the 'minimum wait time' is due to timer granularity, and should be unaffected by game speed.
|
||
| Falkoner | May 21 2008, 1:39 am | Post #20 |
|
Taking StarCraft Map Making to the Limit!
|
Yeah, gamespeed is sorta irrelevant, except that the actual trigger cycle runs according to it.
|
||