Making income

Rabarber

You can change this now in User CP.
Reaction score
94
Add to current gold.

The event for this would probably be a Periodic Event, found under Time.
 

thenoobmaper

New Member
Reaction score
2
ok thank you ill try it out :rolleyes: should there be any conditions for this? Wait a second. Will your code work for anything or do i have to change some things to my specifications?
 

Rabarber

You can change this now in User CP.
Reaction score
94
Probably not. A boolean if you want it only to be usable at certain times.
 

Rabarber

You can change this now in User CP.
Reaction score
94
To make it easy, you could make twelve unit-groups or one with twelve arrays and twelve triggers, one for each player.
 

thenoobmaper

New Member
Reaction score
2
i dunno if we are on the same page here. All i want is for 10 gold to be given automaticly every 30 seconds per each citizen unit owned by a certain player.

Could you just tell me the exact trigger?
 

NiKaNoRoU_GR

New Member
Reaction score
115
Events
Every 30 seconds of game time
Conditions
Total number of units in unit group(((citizens) is equal to 1) a variable unit group)))
Actions
Add +10 (property) to X player's current gold
 

Rabarber

You can change this now in User CP.
Reaction score
94
NiKaNoRoU_GR said:
Events
Every 30 seconds of game time
Conditions
Total number of units in unit group(((citizens) is equal to 1) a variable unit group)))
Actions
Add +10 (property) to X player's current gold

And here we have 12 * 100 villagers for each player = 1200 triggers to be made.
 

thenoobmaper

New Member
Reaction score
2
lol ok then! But what is the condition under? I.E player group, boolean comparison, unit comparison, ect.?
 

thenoobmaper

New Member
Reaction score
2
ok then i got my map editor all opened, but where exacly do i find the condition? like i mean what category is it under or what keywords should i search for? judging by ur condition it looks like ALL players would get 10 gold every 30 seconds, even if they dont own the unit. thats not what i want
 

Sim

Forum Administrator
Staff member
Reaction score
534
NiKaNoRoU_GR said:
Events
Every 30 seconds of game time
Conditions
Total number of units in unit group(((citizens) is equal to 1) a variable unit group)))
Actions
Add +10 (property) to X player's current gold

This won't work at all. You don't give 10 gold per citizen, you check if he has 1 citizen. That's all. The counting of the citizens won't go in the trigger conditions. You will first have to pick all the citizens that players has, set an integer variable to that value (Say... 6) then calculate the gold added compared to the integer variable. Not hard at all. It would give 60 gold to that player.

Code:
Income
   Events
      Time - Every 30 seconds of game-time
   Conditions
   Actions
      For Each Integer A from 1 to 12, do Actions
         Loop - Actions
            Set Unit_Group_Var = (Units owned by (Player((Integer A))) of type Citizen)
            Unit Group - Pick every units in Unit_Group_Var and do Set Integer_Var = (Number of units in Unit_Group_Var)
            Player - Add ((Integer_Var) x 10) to (Player((Integer A))) Current gold
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top