- Joined
- May 23, 2019
- Messages
- 2
Hi. I'm trying to use a timer array as explained in this post. The trigger I've came up with is supposed to print the texts "1", "2" and "3". But it's only printing "1". I can't understand why it doesn't work properly. Would you mind telling me what's going on? This is how I coded it:
-
Initialization
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set hashtable = (Last created hashtable)
-
For each (Integer index) from 1 to 3, do (Actions)
-
Loop - Actions
-
Trigger - Add to TimerExpires <gen> the event (Time - timer[index] expires)
-
Custom script: set udg_timerHandle = udg_timer[udg_index]
-
Hashtable - Save index as 0 of (Key timerHandle) in hashtable
-
-
-
-
-
TimerStarts
-
Events
-
Player - Player 1 (Red) types a chat message containing Start as An exact match
-
-
Conditions
-
Actions
-
Countdown Timer - Start timer[1] as a One-shot timer that will expire in 5.00 seconds
-
Countdown Timer - Start timer[2] as a One-shot timer that will expire in 5.00 seconds
-
Countdown Timer - Start timer[3] as a One-shot timer that will expire in 5.00 seconds
-
-
-
TimerExpires
-
Events
-
Conditions
-
Actions
-
Set index = (Load 0 of (Key (Expiring timer)) from hashtable)
-
Game - Display to (All players) the text: (String(index))
-
Hashtable - Clear all child hashtables of child (Key (Expiring timer)) in hashtable
-
-