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

need help

Status
Not open for further replies.
Level 3
Joined
Aug 4, 2013
Messages
55
  • Event Finish
    • Events
      • Unit - A unit Dies
    • Conditions
      • (String((Player number of (Owner of (Dying unit))))) Equal to String_Loc
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) is A Hero) Equal to True
        • Then - Actions
          • Player - Add 200 to (Owner of (Killing unit)) Current gold
          • Game - Display to (All players) the text: (PlayerName[(Player number of (Owner of (Killing unit)))] + has win the event.)
          • Quest - Destroy Quest
          • Trigger - Turn on Event <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
why my trigger not working?
 
Level 3
Joined
Aug 4, 2013
Messages
55
  • Actions
    • Set PlayerName[1] = (|CFFFF0303 + ((Name of Player 1 (Red)) + |R))
    • Set PlayerName[2] = (|CFF0042FF + ((Name of Player 2 (Blue)) + |R))
    • Set PlayerName[3] = (|CFF1BE6D8 + ((Name of Player 3 (Teal)) + |R))
    • Set PlayerName[4] = (|CFF540081 + ((Name of Player 4 (Purple)) + |R))
    • Set String_Loc = PlayerName[(Random integer number between 1 and 4)]
srry, here you go
 
Level 11
Joined
Nov 15, 2007
Messages
800
FYI, why the original doesn't work:
  • Conditions
    • (String((Player number of (Owner of (Dying unit))))) Equal to String_Loc
  • Actions
    • Set PlayerName[1] = (|CFFFF0303 + ((Name of Player 1 (Red)) + |R))
    • Set PlayerName[2] = (|CFF0042FF + ((Name of Player 2 (Blue)) + |R))
    • Set PlayerName[3] = (|CFF1BE6D8 + ((Name of Player 3 (Teal)) + |R))
    • Set PlayerName[4] = (|CFF540081 + ((Name of Player 4 (Purple)) + |R))
    • Set String_Loc = PlayerName[(Random integer number between 1 and 4)]

You set the variable to the player's name, but the condition uses the player number.
 
Status
Not open for further replies.
Top