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

[Trigger] What Am I Doing Wrong?

Status
Not open for further replies.
Level 2
Joined
Dec 26, 2007
Messages
7
problem.jpg



I want it so when players step into the region, they buy a snapdragon.
I've got it to work partially.
When a player steps on the region, 500 gold is deducted and a snapdragon is formed at the region.
But, when they step on the region a second time, no gold is deducted, but it still creates a snapdragon.
I want it to continue to deduct gold.
How do I do this?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
The only thing your doing wrong here is not using the [ TRIGGER ] tags. Copy to Text your triggers and paste them between the tags to get the triggers posted on The Hive Workshop.

As for your trigger: Check if the player got 500 gold first before taking his money and giving him a snap dragon. If that doesn't work, then I can tell you that it's not in the trigger (unless you made a mistake with checking if the player had 500 gold)
 
Level 2
Joined
Dec 26, 2007
Messages
7
  • Unit - A unit enters buysuumpmolk <gen>
  • Player - Add -500 to Player 1 (Red) Current gold
  • Unit - Create 1 Snap Dragon for Player 1 (Red) at (Center of archerregion <gen>) facing Default building facing degrees
OK, got it.
I had to edit the Action, it was removing 500 gold from the gold mine itself.
But, it gives the player a snapdragon even if they don't have enough gold, or 0.
I haven't made a condition before, is that how I do this?
I've looked through, and found nothing to do with amounts of gold.
How would I do this?
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
Under General, look for the action "If/Then/Else Multiple Actions".

Then put something like this in there to replace yoru current actions

  • Conditions
    • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 500
Add that in the Condition. It's found under "Integer Comparison"
 
Status
Not open for further replies.
Top