Warcraft III resources & community, 2003–2006 · archived

Astrobrat needs yet more help!

7 posts
#1

Astrobrat needs yet more help!

I have encountered another trigger problem on my map Sim City. This time I know it has to do with triggers. You are supposed to be able to go into Mac's Garage, and there is an object called Buy Horse 100 Gold with a region on it named Horsemacsgaragered. You are supposed to be able to move on it, and if you have 100 gold or more, a Horse belonging to red will appear on another region called Macsgarage. Then it is supposed to take away 100 gold from your rescources. I have tried many ways to do this, yet I am still certain there is a way. Any help?
#2
Event: a unit enters region macshorres

Condition: Owner of entering unit has 100 gold properties (Im not exactly sure how it goes)

Actions: create 1 horse at macshorseregion for owner of triggering unit.
Player -> remove 100 gold from owner of entering unit's gold.
#3
My problem is in the Condition and part of the Action. Where are the triggers that check how much gold the player has, and the trigger that takes away gold?
#4
I have found a way but i dont know how to make it easier
maybe it will beable but i have found another way:
First make a Variable named Gold_of_Player as a Integer
Than the trigger
Events:
A Unit enters (your region)
Conditions:
None
Actions:
Set Gold_of_Player to Player - Gold Proberty of Owner of Entering Unit
If/Then/Else Multiple Actions
If Conditions:
Gold_of_Player bigger as 100
Than Actions:
Set Gold_of_Player to Gold_of_Player - 100

Player - Set Gold Propertie of Owner of Entering Unit to Gold_of_Player

Create 1 Horse at (your position)
Else Actions:
Do nothing
If it works it will good i dont know it but i think it works.
#5
There is no need to set the gold variable twice. To take gold away, you just do "Add property" and input a minus figure. That makes things easier.
#6
I am really confused and I was imagining this as gonna be really simple when I started =(. Can someone please step-by-step the trigger?
#7
Come on people, please help me.