• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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