TooSlowFcker
New Member
- Reaction score
- 10
Whenever i use this trigger, it fails.
I want it so that you have to have 50 wood 5 gold to make a gold mine, or else the gold mine wont be created, but this trigger isn't working, can you help me?
I want it so that you have to have 50 wood 5 gold to make a gold mine, or else the gold mine wont be created, but this trigger isn't working, can you help me?
Code:
Untitled Trigger 020
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to |c0033ccffGold Mine|r
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) Current gold) Greater than or equal to 5
((Owner of (Triggering unit)) Current lumber) Greater than or equal to 50
Then - Actions
Player - Add -50 to (Owner of (Triggering unit)) Current lumber
Player - Add -5 to (Owner of (Triggering unit)) Current gold
Else - Actions
Unit - Create 1 Gold Mine for (Triggering player) at (Target point of ability being cast) facing Default building facing degrees
Neutral Building - Set (Last created unit) to 100 gold
Unit - Order (Triggering unit) to Stop
Trigger - Run (This trigger) (checking conditions)