• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Floating Text Above Unit Matches Player Color

Status
Not open for further replies.
Level 8
Joined
Feb 17, 2007
Messages
368
  • Floating Text - Create floating text that reads Countered... above |cff9932ccFrieza|r 0031 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
How do I make it so that the Countered part matches the color of the owner of the unit who is using the counter ability on the target??
 
Level 8
Joined
Nov 9, 2008
Messages
502
You need to set up an initial string array of max size being the max players in your map.

  • setcolours
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set PlayerColour[1] = |CFFFF0303
      • Set PlayerColour[2] = |CFF0042F
      • -------- e.t.c. --------
Then when you make your text you do...
  • Floating Text - Create floating text that reads PlayerColour[GetTriggeringPlayerID()]+Countered+|r... above |cff9932ccFrieza|r 0031 <gen> ...
That will colour the text with the hex code in the array index corresponding to the ID of the triggering player.

Ofcourse if you do this you can do it anywhere else in the map including the second part of that text action.
 
Status
Not open for further replies.
Top