• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Condition current gold

Status
Not open for further replies.
Level 11
Joined
Apr 27, 2009
Messages
223
I used a trigger to make hero buy items. And when i copied the trigger into the map i was configurating it for it doesnt work. HELP.

  • Buy Items
    • Events
      • Unit - A unit enters RightSideSpawn <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to Computer
    • Actions
      • -------- --------
      • -------- --------
      • -------- --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of AIHero[(Player number of (Owner of (Triggering unit)))]) Current gold) Greater than or equal to 250
        • Then - Actions
          • Game - Display to (All players) for 7.00 seconds the text: (String((Unit-type of (Triggering unit))))
          • Player - Add -250 to (Owner of (Triggering unit)) Current gold
          • Hero - Create Boots of Speed and give it to (Triggering unit)
        • Else - Actions
So after testing it i deleted the condition for current gold and he got Boots of speed seems that the problem is the condition:

  • ((Owner of AIHero[(Player number of (Owner of (Triggering unit)))]) Current gold) Greater than or equal to 250
even this doesnt work

  • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 250
Can someone explain why it doesnt work? When i quit the game computer had more then 1000 gold.
 
Last edited:
Level 5
Joined
Apr 7, 2018
Messages
69
so i looked at it, i put this in there so i can see how much gold they have
  • TEST
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Player 1 (Red) Current gold)))
      • Game - Display to (All players) the text: (String((Player 2 (Blue) Current gold)))
      • Game - Display to (All players) the text: (String((Player 3 (Teal) Current gold)))
      • Game - Display to (All players) the text: (String((Player 4 (Purple) Current gold)))
      • Game - Display to (All players) the text: (String((Player 5 (Yellow) Current gold)))
      • Game - Display to (All players) the text: (String((Player 7 (Green) Current gold)))
      • Game - Display to (All players) the text: (String((Player 8 (Pink) Current gold)))
      • Game - Display to (All players) the text: (String((Player 9 (Gray) Current gold)))
      • Game - Display to (All players) the text: (String((Player 10 (Light Blue) Current gold)))
      • Game - Display to (All players) the text: (String((Player 11 (Dark Green) Current gold)))
this is result:
348
0
0
0
0
0
0
0
0
0
0
 
Status
Not open for further replies.
Top