• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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
781
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