• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Naming a Unit at the start of a map.

Status
Not open for further replies.
Level 6
Joined
Dec 9, 2014
Messages
176
I was wondering if someone could help me with a trigger that would allow the player to name their hero at the start of a map? Also, would it possible to take whatever they name it and use it as a variable or something so I can insert it into future npc dialog?
 
Level 6
Joined
Dec 9, 2014
Messages
176
So what I was thinking was that when the map first starts it asks what you would like your name to be and then the player types whatever they want and from then on that name is used in future interactions with npcs. Any tips on where to start with that?
 
Level 6
Joined
Dec 9, 2014
Messages
176
This example map allows you to set your character name for cinematics or whatever else you want to use the string in.

Awesome! Thanks so much! I made one as well, but yours is much better lol! Here was my attempt.

  • Naming
    • Events
      • Player - Player 1 (Red) types a chat message containing /n as A substring
    • Conditions
    • Actions
      • Set Name = (Substring((Entered chat string), 4, (Length of (Entered chat string))))
      • Player - Set name of Player 1 (Red) to (Substring((Entered chat string), 4, (Length of (Entered chat string))))
      • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Top