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

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