Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,219
hey got a little problem with a simple trigger here, this is not finished at all but it bugs allready -.-
the trigger is supposed to show name above the unit and change the colour depending on lvl. But somehow when I lvl up the text become red not green idk why :/
the trigger is supposed to show name above the unit and change the colour depending on lvl. But somehow when I lvl up the text become red not green idk why :/
-
Show names
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Current camera bounds)) and do (Actions)
-
Loop - Actions
- Set u = (Picked unit)
- Set level = (Level of hero)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of (Picked unit)) Less than or equal to (level - 5)
-
Then - Actions
- Set name = (|CFF20C000 + ((Name of u) + |R))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of (Picked unit)) Less than or equal to (level + 5)
-
Then - Actions
- Set name = ( |CFFFF0303 + ((Name of u) + |R))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of (Picked unit)) Greater than or equal to (level - 2)
- (Level of (Picked unit)) Less than or equal to (level + 2)
-
Then - Actions
- Set name = ( |CFFFFFF01 + ((Name of u) + |R))
- Else - Actions
-
If - Conditions
- Set loc = (Position of u)
- Set loc2 = (loc offset by 100.00 towards 135.00 degrees)
- Set text = (Load 1 of (Key (Picked unit)) in index_tableIf the label is not found, this function returns NULL.)
- Floating Text - Destroy text
- Floating Text - Create floating text that reads name at loc2 with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Set text = (Last created floating text)
- Hashtable - Save Handle Oftext as 1 of (Key (Picked unit)) in index_table
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in (Current camera bounds)) and do (Actions)
-
Events