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

[Trigger] Building Income

Status
Not open for further replies.
Level 12
Joined
Dec 13, 2008
Messages
1,049
Hey. I need help with a trigger. I want a trigger where when you capture a mining site or lumber site, you get 1 gold per 30 sec. Then there are outposts and these outposts give 1 gold per 30 sec UNLESS you have captured a mining site or lumber site in the same region. If that occurs, then you get 3 gold per 30 sec from the outpost. Also, you capture these buildings by getting their health to 50.
How do i do this!?
 
Level 4
Joined
Mar 6, 2007
Messages
73
You need a trigger that change ownership of the unit when its hp reach 50. You also need a trigger that check if you control a specifie unit type and gives gold equal to the number of those buildings. You need an if/then/else trigger that look if you control both buildings of just 1 so it gives the proper amount of gold. Ill can try to do it if you want to.
 
Level 4
Joined
Sep 2, 2006
Messages
99
I couldn't which means I didn't want to spend my whole afternoon figuring out how to detect when units are close anyways.
  • IncomeAmmount
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • -------- This makes Player 1's income the ammount of farms Player 1 owns. --------
      • Set redincome = (Number of units in (Units owned by Player 1 (Red) of type Farm))
  • GettingIncome
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • -------- This gives the ammount of farms Player 1 owns in gold. --------
      • Player - Add redincome to Player 1 (Red) Current gold
 
Level 12
Joined
Dec 13, 2008
Messages
1,049
ok, ima have my friend ucantwin help me understand that....i am not very good with triggers. thanks tho! ima use it (PS, if it works, ill give ya credits and rep)
 
Status
Not open for further replies.
Top