• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How can I use TriggerSleepAction?

Status
Not open for further replies.

Deleted member 219079

D

Deleted member 219079

How can I use it?

Can I use it in scenario as:
JASS:
function someFunc takes nothing returns nothing
	call TriggerSleepAction(1000)
	call BJDebugMsg("1 second...")
endfunction
function on0sec takes nothing returns nothing
	call someFunc()
	call BJDebugMsg("0 seconds...")
endfunction

Given as I suspect I can't use it on Conditions, does it work if use TriggerEvaluate() on a trigger which has action attached to it?

Does TriggerSleepAction() work on ExecuteFunc()?
 
Then what should I make to create a jass representive for
  • Trigger
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Welcome to my map!
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: Blah blah...
 
how do you use TriggerSleepAction? you dont. It will not work with TriggerEvaluate, because that only runs conditions attached to trigger. To run actions attached to trigger you should use TriggerExecute.

I dont know if it is safe to use TriggerSleepAction within ExecuteFunc or TimerStart, or even Or, And.

You may have to test that out
 
Then what should I make to create a jass representive for
  • Trigger
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Welcome to my map!
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: Blah blah...

this is something I did a while ago. But the problem I ran into was obviously how do I pause the trigger. The only thing I came up with was to create a infinite loop and break it once the time had passed. Sadly it caused extreme lag so I never published it.
 
no, if you use TriggerSleepAction inside triggercondition block for instance, you will immediately crash the running execution, also Wait does not give a shit if dialog box is opened, or if your game is even opened(alt-tab and the waits still run like nothing ever happened)
 
Status
Not open for further replies.
Back
Top