- Joined
- Sep 28, 2004
- Messages
- 365
Hi all i was playing around with timers and wanted to do a MUI version of it but i got some problem. Why is my below code not MUI for timers? The 2nd time of casting thunderclap won't will stop the timer and won't show the time left anymore.
I've also attach the map below so you guys can test it.
If any of you know the problem please let me know. Thanks in advance!
I've also attach the map below so you guys can test it.
-
Melee Initialization
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Visibility - Disable fog of war
-


Visibility - Disable black mask
-


Hero - Learn skill for Mountain King 0000 <gen>: Thunder Clap
-


Unit - Set level of Thunder Clap for Mountain King 0000 <gen> to 3
-


-------- hashtable --------
-


Hashtable - Create a hashtable
-


Set timetable = (Last created hashtable)
-
-
-
cast
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Thunder Clap
-
-

Actions
-


Countdown Timer - Start timer as a One-shot timer that will expire in 10.00 seconds
-


Set tempPos = (Position of Spell Breaker 0002 <gen>)
-


Unit - Create 1 Footman for Player 1 (Red) at tempPos facing Default building facing degrees
-


Unit Group - Add (Last created unit) to dummygroup
-


Hashtable - Save Handle Oftimer as (Key time) of (Key (Last created unit)) in timetable
-


Trigger - Turn on time <gen>
-


Game - Display to (All players) the text: |cff00FF00START!|r
-


Custom script: call RemoveLocation(udg_tempPos)
-
-
-
time
-

Events
-


Time - Every 0.10 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in dummygroup and do (Actions)
-



Loop - Actions
-




For each (Integer A) from 0 to 10, do (Actions)
-





Loop - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Elapsed time for (Load (Key time) of (Key (Picked unit)) in timetable)) Equal to (Real((Integer A)))
-
-







Then - Actions
-








Game - Display to (All players) the text: (Time Left: |cffffcc00 + ((String((10 - (Integer A)))) + |r))
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(10 - (Integer A)) Equal to 0
-
-









Then - Actions
-










Game - Display to (All players) the text: |cffFF0000END!|r
-










Unit Group - Remove (Picked unit) from dummygroup
-










Unit - Kill (Picked unit)
-










Hashtable - Clear all child hashtables of child (Key (Picked unit)) in timetable
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Number of units in dummygroup) Equal to 0
-
-











Then - Actions
-












Trigger - Turn off (This trigger)
-
-











Else - Actions
-
-
-









Else - Actions
-
-
-







Else - Actions
-
-
-
-
-
-
-
If any of you know the problem please let me know. Thanks in advance!

