• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger]Request to store and load player names

Status
Not open for further replies.
Level 37
Joined
Jul 22, 2015
Messages
3,485
This is what I was telling you to do in chat:

  • Player Names
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set tempPlayer = (Picked player)
          • Set tempInt = (Player number of tempPlayer)
          • Set PlayerName[tempInt] = (Name of tempPlayer)

Then whenever you need to refer to it:
  • Actions
    • Set tempPlayer = (Triggering player)
    • Set tempInt = (Player number of tempPlayer)
    • Game - Display to (All players) the text: PlayerName[tempInt]
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
KILLCIDE's trigger "Player Names" does what you want. It maps all player names to their player slot number. Using the player slot number you can lookup the name the player originally had using the array.

He also gave you an example of how to lookup the names when you require them.
 
Status
Not open for further replies.
Top