• 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.

[Trigger] Change Name

Status
Not open for further replies.
hi this could be a bit difficult
since i am not really good at it myself i can give only a little help

  • change name
  • events
    • map initialization
do u want it to happen at the beginning of the game, (the units are already there)
or do u want it at a point later on? (someone purchases a unit)

  • conditions
    • (none)
  • actions
    • if then else multiple conditions
there should be an action function very similar to this. u will have to do this for every single player :(

  • if - cconditions
    • player 1 player status is playing equal to true
  • then - actions
    • change name of (unit [if already existing]
dunno if such a function exist in GUI (or do u want it in jass????)
i just want to know if that is what u meant

As far as i know there is a function Custom Script
it is similar to jass and if someone gives u tells u the action code in Jass maybe u can use it on your own

hope i could help u a little


@ ghostwolf
is it impossible even in JASS????
i know that it is impossible in GUI
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
The selection of natives contained within WC3 denies a map maker from manipulting a hero or unit's type name or name. The closest to such manipulation one can get requires that all possiable combinations of name be pre entered for units and the correct unit is selected with the correct name when required.

All in all what you are asking is not possiable.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Or you could make a trigger that allows a Floating Text to appear above the unit when you want (I suggest you don't choose to place it over their heads always, since that'll give a lot of lag to place a new Floating Text every x seconds. You can choose to make it appear for x seconds when a player selects the unit though)

Just check if that could work for you. If not, then there's really nothing to be done.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
  • Floating Text
    • Events
      • A unit is selected
    • Condition
      • (Triggering Unit) equal to A Hero
    • Actions
      • Floating text - Create floating text above (Triggering Unit) with text (String(Name of (Triggering Unit)))
      • Set Name_FloatingText[(Player number of (Owner of (Triggering Unit)))] = (Last create Floating Text)
      • Wait 3 seconds
      • Floating Text - Destroy Name_FloatingText[(Player number of (Owner of (Triggering Unit)))]
This only works for games where there's only 1 hero per player (Like in RPGs). You can adjust this to what you want if you want it to be available for more units.
 
Status
Not open for further replies.
Top