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

Waiting in a trigger, without using waits.

Status
Not open for further replies.
Level 19
Joined
Oct 12, 2007
Messages
1,821
Hey there.

I've got a dilemma.

Right now I got a system that has waits in it. I want to remove those waits, but I want to be able to smoothly add commands to my GUI based triggers.

This is what I got right now:

1. Queueing various camera movement information.
2. Starting the camera movement in a (JASS-written) system that has waits in it instead of a timer.
3. Some more actions like creating units, and stuff.


Let's say the camera movement takes 5 seconds, then I want #3 to occur after those 5 seconds. If I use a timer in the JASS system instead of the waits I will end up with #3 occuring at the same time as I start the camera movement instead afterwards.
#1 are commands with Custom Script function in GUI.
#2 is also a Custom Script function.
#3 are just normal GUI actions. I don't want to have to put these inside the system to occur whenever the timer ends.


Does anyone have an idea how to do this?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
You can use a 0.03 expiration timer and real variables, hashtable/Camera array/ or camera handle id.

Add 5.00 to the camera. It will be reduced by 0.03. When it reaches 0, start the #3.

Though i've never used it, I know you can use TimerUtils for precise time handling using local timers without any problem.
 
Level 6
Joined
Oct 4, 2011
Messages
226
I use a .02 second loop for timer/loop triggers sometimes when I want an Exact number, save 4.98 as x of y in hash, that will trigger 249 times and then on the 250'th time it will trigger and do the effect being 5.00 seconds.
 
Status
Not open for further replies.
Top