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

[Trigger] Player Names

Status
Not open for further replies.
Level 11
Joined
Mar 30, 2008
Messages
666
Player Names [Resolved]

Hey!
I have a little problem with a trigger.
  • First Bloods
    • Events
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
      • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Trigger - Turn off First Bloods <gen>
      • Trigger - Turn off (This trigger)
      • Player - Add 200 to (Owner of (Killing unit)) Current gold
      • Quest - Display to (All players) the Hint message: ((|cff00ccffFirst Blood|r - + PlayerNames[(Player number of (Owner of (Dying unit)))]) + ( has been killed by + (PlayerNames[(Player number of (Owner of (Killing unit)))] + for an additional 200 Gold.)))
      • Sound - Play firstblood <gen>
      • Trigger - Turn on FHK <gen>
      • Player - Add 5 to (Owner of (Killing unit)) Current lumber
Variable = PlayerNames String Array (1)

And when I try it in-game it looks like.

First Blood- _____ has been killed by _______ for an additional 200 Gold.
The Player Name not appears.
Does somebody know?
Thanks,
cHeRoL
 
Last edited:
Level 6
Joined
Aug 22, 2008
Messages
123
What he is trying to show you is:

The array does not contain the proper datas, that means you were setting it up wrong.
You may not need that array when using "Player name of (Owner of (Triggering unit/killing unit))" as Playernames. That array would only make sense if you changed the player names and want to use their previous names:wink:

The initialisation of that array would be correctly done this way (free hand):

Code:
For each Integer A from 1 to 12 do multiple...
    Actions
        set array[Integer A]= Name of (Player (Integer A))
 
Level 11
Joined
Mar 30, 2008
Messages
666
Player Names (Resolved)

Ok,I see.
I changed it to
  • Quest - Display to (All players) the Hint message: ((|cff00ccffFirst Blood|r - + (Name of (Owner of (Dying unit)))) + ( has been killed by + ((Name of (Owner of (Killing unit))) + for an additional 200 Gold.)))
and it works nice.
 
Last edited:
Status
Not open for further replies.
Top