• 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.

Astrobrat needs yet more help!

Status
Not open for further replies.
Level 3
Joined
Feb 2, 2006
Messages
24
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?
 
Level 7
Joined
Dec 17, 2005
Messages
337
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.
 
Level 4
Joined
Aug 3, 2006
Messages
45
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.
 
Status
Not open for further replies.
Top