• 🏆 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!

Item Purchase Through Trigger

Status
Not open for further replies.
Level 3
Joined
Dec 11, 2012
Messages
43
Hello, I am trying to make a item purchasable through a trigger and am stuck at creating the condition. I am trying to make the condition that the triggering player has to have 5000 gold or else it tells him he does not have enough gold and does not give him the item.

This is what I have so far in the photo attached below.
 

Attachments

  • help.png
    help.png
    4.8 KB · Views: 35
Level 13
Joined
May 10, 2009
Messages
868
Use the If-Then-Else statement.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Player has enough gold
    • Then - Actions
      • Item - Give item to player X
    • Else - Actions
      • Game - Tell a player to...
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Player gold is an integer number, so you have to look at integer comparison.
Then select player property and select gold there (I think gold is selected by default).
 
Status
Not open for further replies.
Top