Xan_Kriegor
I can change this now in User CP.
- Reaction score
- 12
In my map I'm working on I want to have floating text for nametags on units (map-player defined, but not really relevant). I need it to be MUI (more than one nametagged unit per player, otherwise I'd use global variables) so I'm trying to use hashtables, but they're simply not working. The nametags get initialized just fine but they don't move at all. Here's my triggers for reference:
Any idea why they wouldn't move?
Trigger:
- Nametag Init
- Events
- Map initialization
- Conditions
- Actions
- Set tempUg = (Units in (Playable map area))
- Unit Group - Pick every unit in tempUg and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Unit-type of (Picked unit)) Equal to [some custom units]
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Else - Actions
- Floating Text - Create floating text that reads (Name of (Picked unit)) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Hashtable - Save Handle Of(Last created floating text) as (Key name) of (Key (Picked unit)) in htNametag
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup(udg_tempUg)
- Events
Trigger:
- Nametag follow
- Events
- Time - Every 0.25 seconds of game time
- Conditions
- Actions
- Set tempUg = (Units in (Playable map area))
- Unit Group - Pick every unit in tempUg and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Unit-type of (Picked unit)) Equal to [some custom units]
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Else - Actions
- Floating Text - Change the position of (Load (Key name) of (Key (Picked unit)) in htNametagIf the label is not found, this function returns NULL.) to (Position of (Triggering unit)) with Z offset 0.00
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup(udg_tempUg)
- Events
Any idea why they wouldn't move?