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

[Solved] Reveal real name of the player trigger

Status
Not open for further replies.
Level 16
Joined
Jan 8, 2015
Messages
464
Hi, i wonder how could i fix my trigger(or remake it) to show real name of player(who can change it with -name command) on demand.
At current it's like this
  • real name red
    • Wydarzenia
      • Gracz - Gracz 2 (Niebieski) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 3 (Seledynowy) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 4 (Fioletowy) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 5 (żółty) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 6 (Pomarańczowy) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 7 (Zielony) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 8 (Różowy) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz 9 (Szary) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz10 (Jasnoniebieski) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz11 (Ciemnozielony) types a chat message containing -real red as Idealna zgodność
      • Gracz - Gracz12 (Brązowy) types a chat message containing -real red as Idealna zgodność
    • Warunki
    • Akcje
      • Gra - Display to (All players) the text: (Name of Gracz 1 (Czerwony))
(Gracz = player; Idealna zgodność = perfect match; wydarzenia = events; akcje = actions)
It only shows Current name given to a player ingame, so it's whatever he changed it to. I seen maps do this already. Sooo how it's done propely?
 
Last edited:
During map initilization, store their names into a variable array that corresponds to their player number.

  • MapInit
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Player = (Picked player)
          • Set RealName[(Player number of Player)] = (Name of Player)
Whenever you need their real name, just reference RealName[] instead.
 
Level 16
Joined
Jan 8, 2015
Messages
464
During map initilization, store their names into a variable array that corresponds to their player number.

  • MapInit
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Player = (Picked player)
          • Set RealName[(Player number of Player)] = (Name of Player)
Whenever you need their real name, just reference RealName[] instead.
Thanks, but could you clear few things for me? What exact variable type you chose for 'realName' one?
 
Level 16
Joined
Jan 8, 2015
Messages
464
So now i need to make action that gets RealName and set player number, 1-12 - in value?
EDIT: it works :) +rep to both of you :v
 

Attachments

  • trigger real name2.jpg
    trigger real name2.jpg
    81.9 KB · Views: 64
  • trigger real name 3.jpg
    trigger real name 3.jpg
    61.3 KB · Views: 55
Last edited:
Status
Not open for further replies.
Top