# Income system

Status
Not open for further replies.

#### medion555

Level 9
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

#### Starquizer

Level 16
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)

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)
• Else - Actions

#### medion555

Level 9
isnt there an trigger wich does it for al players with a variable wich also maxes the ore mines

#### Starquizer

Level 16
isnt there an trigger wich does it for al players with a variable wich also maxes the ore mines

Look at my edit in the previous post.

#### medion555

Level 9
cant find maxplayer

EDIT

cant get the +50 the rest is done

Last edited:

#### Maker

Level 37
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.

Not sure if that's your problem though.

#### Starquizer

Level 16
cant find maxplayer

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.

#### medion555

Level 9
Ok but i still have problems with the +50 at the end just say how step by step you did the last line

#### Starquizer

Level 16
• Player - Set Player 1 (Red) Current gold to 750
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 /

Last edited:

#### medion555

Level 9
thx il see if it works now

Status
Not open for further replies.

[Trigger] Income
Replies
14
Views
898
Replies
9
Views
709
[Trigger] Income
Replies
3
Views
667
[Trigger] Spell help
Replies
23
Views
2K
Replies
14
Views
1K