• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Bug with "call TriggerSleepAction (X)"

Status
Not open for further replies.
Level 12
Joined
Sep 4, 2007
Messages
407
Why does sometimes when i use that action (call TriggerSleepAction(X)), it works like "Skip Remaining Actions"?

I hate that. In some Triggers it works perfectly and the trigger waits until the time to pass to continue its actions. In others it just ignores the actions that come after it. I suppose you've been through that, right?
 
I had to remove the waits from my JASS cinematic. They were causing a glitch for me. What I had in my trigger was essentially a lot of this:

JASS:
function cin1
//actions
call TimerStart (t, 1.2, function cin2)
endfunction
 
function cin0 takes nothing returns nothing
//actions
call TimerStart (t, 0.32, function cin1)
endfunction
I guess, with so many of these timer-called functions, my waits were actually collapsing the string and discontinuing all further actions. So stupid.
 
Level 12
Joined
Sep 4, 2007
Messages
407
Could you link your triggers? Sometimes there might be something that causes it to take exceptionally long, such as running it in a loop.

It shouldn't cause normal problems like that though, if used correctly.


All of them are made in locals and work in loops since they are made for hashtable created units (LoopA is the Player, LoopB is the units(artificial) Id)

(i found a way to solve this, but it actually removes the 'call TriggerSleepAction(x)', instead i create a dummy unit with countdown timer and make the trigger continue with the death of it (wait until condition --> life of dummy unit = 0.00 )

Anyway, the question still remains. I'd sure would like to use a a lot simplier action than having to create a unit at target x n' y for stored player blah blah blah and make it die.
 
Level 12
Joined
Sep 4, 2007
Messages
407
srry found out the problem. the Wait action was working inside a loop. outside the loop, the trigger would go on. so... in the end of the trigger there was the "local unit = null" etc. by the time the wait finished, the local variable stating the unit was already gone, making the trigger not to work properlly.
 
Status
Not open for further replies.
Top