Welp, I'm stumped, this is the first time I've tried using a hashtable but it seemed fairly straight forward. What I want to do is create a hashtable that stores the names of triggers so that I can assign said names to a trigger variable for use in registering a custom event to a trigger.
1. Create Hashtable
2. Save string in hashtable "gg_trg_Adjust_Cam_Slow_" + toString(loop + 1)
3. Set triggerName = hashvalue 0 of 0
4. Run my custom script where it registers the event to the trigger using triggerName as the name of the trigger.
Then it just loops for all that I need it for.
-
Add Events to Buttons
- Events
- Conditions
-
Actions
- Hashtable - Create a hashtable
-
For each (Integer loop) from 0 to 7, do (Actions)
-
Loop - Actions
- Hashtable - Save (gg_trg_Adjust_Cam_Slow_ + (String((loop + 1)))) as 0 of 0 in (Last created hashtable).
- Set VariableSet triggerName = (Load 0 of 0 in (Last created hashtable).)
- Custom script: call BlzTriggerRegisterFrameEvent(udg_triggerName, but[udg_loop], FRAMEEVENT_MOUSE_ENTER)
-
Loop - Actions
- Set VariableSet loop = 0
-
For each (Integer loop) from 0 to 11, do (Actions)
-
Loop - Actions
- Hashtable - Save (gg_trg_Adjust_Cam_Medium_ + (String((loop + 1)))) as 0 of 0 in (Last created hashtable).
- Set VariableSet triggerName = (Load 0 of 0 in (Last created hashtable).)
- Custom script: call BlzTriggerRegisterFrameEvent(udg_triggerName, butRam[udg_loop], FRAMEEVENT_MOUSE_ENTER)
-
Loop - Actions
- Set VariableSet loop = 0
-
For each (Integer loop) from 0 to 15, do (Actions)
-
Loop - Actions
- Hashtable - Save (gg_trg_Adjust_Cam_Fast_ + (String((loop + 1)))) as 0 of 0 in (Last created hashtable).
- Set VariableSet triggerName = (Load 0 of 0 in (Last created hashtable).)
- Custom script: call BlzTriggerRegisterFrameEvent(udg_triggerName, butThird[udg_loop], FRAMEEVENT_MOUSE_ENTER)
-
Loop - Actions
1. Create Hashtable
2. Save string in hashtable "gg_trg_Adjust_Cam_Slow_" + toString(loop + 1)
3. Set triggerName = hashvalue 0 of 0
4. Run my custom script where it registers the event to the trigger using triggerName as the name of the trigger.
Then it just loops for all that I need it for.