- Joined
- Jun 26, 2019
- Messages
- 318
Hello you all. I need help with this trigger. For player 1, I want the player names to be shown only to player 1 and player 1's team on their hero units, and enemy players cannot see their player names above their hero units. Same thing for player 2 and player 2's team.
-
startgame
-
Events
-
Time - Elapsed game time is 1.00 seconds
-
-
Conditions
-
Actions
-
Set VariableSet TempPoint = (Random point in Team1start <gen>)
-
Unit - Create 1 Footman for Player 1 (Red) at TempPoint facing Default building facing degrees
-
Set VariableSet TempPoint = (Random point in Team2start <gen>)
-
Unit - Create 1 Footman for Player 2 (Blue) at TempPoint facing Default building facing degrees
-
Game - Enable selection and deselection functionality (Disable selection circles)
-
Game - Disable pre-selection functionality (Disable pre-selection circles, life bars, and object info)
-
Visibility - Disable black mask
-
Visibility - Disable fog of war
-
Wait 1.00 seconds
-
Visibility - Enable fog of war
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Trigger - Turn off (This trigger)
-
-
-
PlayersNameText
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet TempGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Peasant) or ((Unit-type of (Matching unit)) Equal to Footman)))
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet TempString = (Name of (Owner of (Picked unit)))
-
Set VariableSet TempPoint = (Position of (Picked unit))
-
Set VariableSet TempPoint2 = (TempPoint offset by (5.25 x (Real((Length of TempString)))) towards 180.00 degrees.)
-
Set VariableSet TempFtext = (Load (Key text.) of (Key (Picked unit).) in Hashtable)
-
Floating Text - Destroy TempFtext
-
Floating Text - Create floating text that reads (|cffffcc00 + (TempString + |r)) at TempPoint2 with Z offset ((Current flying height of (Picked unit)) + 130.00), using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Hashtable - Save Handle Of(Last created floating text) as (Key text.) of (Key (Picked unit).) in Hashtable.
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Custom script: call RemoveLocation(udg_TempPoint2)
-
-
-
Custom script: call DestroyGroup(udg_TempGroup)
-
-
