Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
ok guys that doesnt have ANYTHING to do with the farm... All you are doing is selecting units, then giving gold. You have to set a variable to the number of units type of farm owned by player 1 that are alive, then multiply that by the income per farm (in this case 1 so dont multiply) then you have to set player 1 gold to player 1 current gold plus the variable you just made.
Heres the trigger:
Actions
Set Farms = (Number of living Farm units owned by Player 1 (Red))
Player - Set Player 1 (Red) Current gold to ((Farms x 1) + (Player 1 (Red) Current gold))
If you created upgraded farms that provided additional income (and food) you can change the (Farms x 1) to (Farms x 2) or 3 or whatever. I just put the x 1 there cuz if the farm gives anything but 1 income you need it, but if ur only doin 1 income you dont. You will have to make this for each player too (in same trigger just copy the actions and change player 1 to player 2, etc)
ok guys that doesnt have ANYTHING to do with the farm... All you are doing is selecting units, then giving gold. You have to set a variable to the number of units type of farm owned by player 1 that are alive, then multiply that by the income per farm (in this case 1 so dont multiply) then you have to set player 1 gold to player 1 current gold plus the variable you just made.
Heres the trigger:
Actions
Set Farms = (Number of living Farm units owned by Player 1 (Red))
Player - Set Player 1 (Red) Current gold to ((Farms x 1) + (Player 1 (Red) Current gold))
If you created upgraded farms that provided additional income (and food) you can change the (Farms x 1) to (Farms x 2) or 3 or whatever. I just put the x 1 there cuz if the farm gives anything but 1 income you need it, but if ur only doin 1 income you dont. You will have to make this for each player too (in same trigger just copy the actions and change player 1 to player 2, etc)
Actually pick every unit and do X is a looping function that repeats the trigger for each unit. So it does practically the exact same thing as your considerably longer trigger. And why would you use set property instead of add property...? Though you are right about the group being better as only living units. So,
Farmz
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Farm) and (((Matching unit) is alive) Equal to True))) and do (Player - Add 1 to (Owner of (Picked unit)) Current gold)
That'll work fine. Try it yourself. Plus, your way would have to be done individually for every player in the game.
Wolfman, I'm afraid the others are right, as, though your way works, you can do more with the others' ways and do just the same in terms of adding gold per farm.
Well idk i read a post on income like this before and it said to do it the long way with variables. Yeah i just tried the way you said and it works O.O ...so much time wasted.... lol
Well idk i read a post on income like this before and it said to do it the long way with variables. Yeah i just tried the way you said and it works O.O ...so much time wasted.... lol
ok ok i will say it just because ur waiting for me to say ur right myself so you can revel in your glory and laugh at my defeat and whatnot... you, Sir Squiggy (and everyone else who agreed with him and said what he said), are indeed correct. Happy? lol
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.