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!
Im having an little bit problems making an variable wich makes an certain unit the trigering unit
i want if an players build an oremine he gets some gold every xxx seconds
with an max of 5 mines
I am not profesional at english, but the AN word is added to words starting with vowel letters like a,e,i,o,u(if pronouced as A like in an umbrella). So its a variable not an variable and a unit not an unit and a max not an max
Ore Timed Increase
Events
Time - Every 2.00 seconds of game time
Conditions
(Number of living OreMine units owned by Player 1 (Red)) Greater than or equal to 1
Actions
Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) + 50)
<< ADDED >>
And here is another trigger for more than one player
Ore Timed Increase
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to MaxPlayers, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of living OreMine units owned by (Player((Integer A)))) Greater than or equal to 1
Then - Actions
Player - Set (Player((Integer A))) Current gold to (((Player((Integer A))) Current gold) + 50)
Do you know how to use the arithmetic function? Choose that from the list, click on the first "1" and put Player Gold there and the other "1" to 50. Use + operator, which is the default choise.
maxplayers is just an integer variable I made, that variable represent the number of players currently in the game or you could just make the loop from 1 to 16.
This is the default action when selecting it from the action list. Click on the 750 that will open a window select Arithmatic function (it should be like this: Value+1 ) now set every part to what you want, in this example set Value to Player 1 (Red)Current Gold and the 1 to the number you want as for the + its an operator and can be set to - x or /
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.