• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

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