• 🏆 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!

[Solved] How do I display the name of a unit in a text message?

Status
Not open for further replies.
Level 5
Joined
May 20, 2008
Messages
138
How do I display the name (unit type) of a certain unit in a text message? The action I am currently using writes the unit name as for example a "custom_H007" instead of a "Mage" or whatever my unit type (hero type) might be called.

  • Boss siphon soul spell drain
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Boss5) Boss Siphon Soul lightning
    • Actions
      • Game - Display to (All players) the text: (|cffffcc00The Witch Doctor cast Siphon Soul on a + ((String((Unit-type of (Target unit of ability being cast)))) + and now has access to some of its abilities!|r))
    • etc.
 
Last edited by a moderator:
When you are inputting a value for the "Text" field, click the "Function" bar, and then look at the bottom for "Unit - Unit Name".

67468i.jpg
 
Status
Not open for further replies.
Top