• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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 3
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