• 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.

[JASS] call TriggerSleepAction (?)

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
I dont really think you are understanding what you are doing.

Bribe will never (ever) recommend someone to use TriggerSleepAction() if it is not about clearing local data.
What he does is simply ending the current function and creating a new one that runs by a timer...
So this cannot be used in a lot of circumstances and will not allow you to use local variables properly.

So to sum it up:
1, Bribe did not recommend you to use TriggerSleepAction().
2, It is better to use timers.
3, Waits are still horrible, but you can use them because you wouldnt really care about the inaccuracy... except if you want that map to work in multiplayer, then
4, You have to use timers instead.
 
I dont really think you are understanding what you are doing.

Bribe will never (ever) recommend someone to use TriggerSleepAction() if it is not about clearing local data.
What he does is simply ending the current function and creating a new one that runs by a timer...
So this cannot be used in a lot of circumstances and will not allow you to use local variables properly.

So to sum it up:
1, Bribe did not recommend you to use TriggerSleepAction().
2, It is better to use timers.
3, Waits are still horrible, but you can use them because you wouldnt really care about the inaccuracy... except if you want that map to work in multiplayer, then
4, You have to use timers instead.

Hey, thanks for the summary. Well put. I think I get it now. I am using them in a single player map to play music every 2 minutes. Accuracy doesn't seem like an issue, but I will try to avoid them as often as possible. Bribe's tutorial is about
JASS:
//! runtextmacro SleepAction("0.0", "1")
I didn't notice the difference at first, but now I get it.
 
Status
Not open for further replies.
Top