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

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


For each (Integer LoopInt) from 1 to [X], do (Actions)



Loop - Actions




Set Group = (Units owned by (Player(LoopInt)) of type Market1)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Player - Add 150 to (Player(LoopInt)) Current gold




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market2)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Player - Add 250 to (Player(LoopInt)) Current gold




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market3)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Player - Add 325 to (Player(LoopInt)) Current gold




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market4)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Player - Add 495 to (Player(LoopInt)) Current gold




Custom script: call DestroyGroup(udg_Group)
Income

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


For each (Integer LoopInt) from 1 to [X], do (Actions)



Loop - Actions




Set IncomeAmount[LoopInt] = 0




Set Group = (Units owned by (Player(LoopInt)) of type Market1)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 150




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market2)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 250




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market3)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 325




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market4)




Unit Group - Pick every unit in Group and do (Actions)





Loop - Actions






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 495




Custom script: call DestroyGroup(udg_Group)
It removes the unit group leak.Yes that is this what i need but one question what does the Custom skript do?
AreaSpawn
Events

Time - Elapsed game time is 10.00 seconds
Conditions
Actions

Create 1 swordmen for player 6 (orange) at EnemySpawn1 facing handicap for building orientation degrees

Custom skript: call RemoveLocation(udg_EnemySpawn1)
AreaSpawn2
Events

Time - Elapsed game time is 15.00 Seconds
Conditions
Actions

Create 5 Knights for Player 6 (Orange) at EnemySpawn1

Custom Skript: call RemoveLocation(udg_EnemySPawn1)
Apocalypses Income Counter

Ereignisse


Zeit - Every 2.00 seconds of game time

Bedingungen

Aktionen


For each (Integer LoopInt) from 1 to X_X, do (Actions)



Schleifen - Aktionen




Custom script: call DestroyGroup(udg_Group)




Set IncomeAmount[LoopInt] = 0




Set Group = (Units owned by (Player(LoopInt)) of type Market_1Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 150)]




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_2Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 250)]




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_3Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 325)]
Apocalypses Income Counter

Ereignisse


Zeit - Every 2.00 seconds of game time

Bedingungen

Aktionen


For each (Integer LoopInt) from 1 to X_X, do (Actions)



Schleifen - Aktionen




Custom script: call DestroyGroup(udg_Group)




Set IncomeAmount[LoopInt] = 0




Set Group = (Units owned by (Player(LoopInt)) of type Market_1Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 150)]




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_2Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 250)]




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_3Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 325)]
So right?^^
(trigger)
Apocalypses Income Counter

Ereignisse


Zeit - Every 2.00 seconds of game time

Bedingungen

Aktionen


For each (Integer LoopInt) from 1 to X_X, do (Actions)



Schleifen - Aktionen




Set IncomeAmount[LoopInt] = 0




Set Group = (Units owned by (Player(LoopInt)) of type Market_1Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 150




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_2Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 250




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_3Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 325




Custom script: call DestroyGroup(udg_Group)
Find income

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


For each (Integer A) from 1 to 12, do (Actions)



Loop - Actions




Set income[(Integer A)] = 0




Set UnitGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Peasant) and (((Unit-type of (Matching unit)) Equal to Footman) and ((Unit-type of (Matching unit)) Equal to Knight))))




Unit Group - Pick every unit in UnitGroup and do (Actions)





Loop - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Unit-type of (Picked unit)) Equal to Peasant







Then - Actions








Set income[(Integer A)] = (income[(Integer A)] + 150)







Else - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(Unit-type of (Picked unit)) Equal to Footman









Then - Actions










Set income[(Integer A)] = (income[(Integer A)] + 250)









Else - Actions










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












(Unit-type of (Picked unit)) Equal to Knight











Then - Actions












Set income[(Integer A)] = (income[(Integer A)] + 325)











Else - Actions




Custom script: call DestroyGroup(udg_UnitGroup)
hmm,, its alot smarter to use 1 group, that checks a condition with 4 ands.
1 and = unit type 1.
second and = unit type 2.
and so on,
then check unit type and add the income on the check, alot smarter.
Read the thread.ap0calypse said:For you, I'll make it a simple (yet a bit less good) trigger.
I just thought it'd be easier to copy a unit group loop a few times for every unit type ^^oh..
sorry, didnt see that post.. o.o
but it does matter..
3 unit groups rather then 1 really matters.
its 3 extra groups that the function uses, makes it alot less efficent. and dont use my code if you dont understend it.. cuz i guess hes will be easier ;p
Apocalypses Income Counter

Ereignisse


Zeit - Every 2.00 seconds of game time

Bedingungen

Aktionen


For each (Integer LoopInt) from 1 to 5, do (Actions)



Schleifen - Aktionen




Set IncomeAmount[LoopInt] = 0




Set Group = (Units owned by (Player(LoopInt)) of type Market_1Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 150)]




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_2Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 250)]




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_3Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = IncomeAmount[(LoopInt + 325)]




Custom script: call DestroyGroup(udg_Group)
Multiboard - Set the text for The_Multiboard item in column 1, row 4 to (String(IncomeAmount[1]))
Set IncomeAmount[LoopInt] = (IncomeAmount[LoopInt] + 150)
Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 150.
Set IncomeAmount[LoopInt] = (IncomeAmount[LoopInt] + 150)
Set IncomeAmount[LoopInt] = IncomeAmount[LoopInt] + 150.
Setup Income Count

Events


Time - Elapsed game time is 0.05 seconds

Conditions

Actions


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------


-------- Income_Multiboard is the multiboard the Update Income trigger uses to update. --------


Set Income_Multiboard = The_Multiboard


-------- my multiboard row 1 = player name, while row 2 = income for that player. --------


-------- the numbers in the [] means the player number, player 1 row = 2, player 2 row = 2, and so on. --------


Set Income_MultiboardIncomeRow[1] = 2


Set Income_MultiboardIncomeRow[2] = 2


Set Income_MultiboardIncomeRow[3] = 2


Set Income_MultiboardIncomeRow[4] = 2


Set Income_MultiboardIncomeRow[5] = 2


Set Income_MultiboardIncomeRow[6] = 2


Set Income_MultiboardIncomeRow[7] = 2


Set Income_MultiboardIncomeRow[8] = 2


Set Income_MultiboardIncomeRow[9] = 2


Set Income_MultiboardIncomeRow[10] = 2


Set Income_MultiboardIncomeRow[11] = 2


Set Income_MultiboardIncomeRow[12] = 2


-------- the numbers in the [] means the player number, player 1 column = 2, player 2 column = 3, and so on. --------


Set Income_MultiboardIncomeColumn[1] = 2


Set Income_MultiboardIncomeColumn[2] = 3


Set Income_MultiboardIncomeColumn[3] = 4


Set Income_MultiboardIncomeColumn[4] = 5


Set Income_MultiboardIncomeColumn[5] = 6


Set Income_MultiboardIncomeColumn[6] = 7


Set Income_MultiboardIncomeColumn[7] = 8


Set Income_MultiboardIncomeColumn[8] = 9


Set Income_MultiboardIncomeColumn[9] = 10


Set Income_MultiboardIncomeColumn[10] = 11


Set Income_MultiboardIncomeColumn[11] = 12


Set Income_MultiboardIncomeColumn[12] = 13


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------


-------- // you can set this to 12, but this makes it alot less efficent. so if you put the exact number, its the best. --------


Set Income_AmountOfPlayers = 12


-------- ------ My favorite part: setting up unit types and incomes. --------


Set Income_MaxUnitTypes = (Income_MaxUnitTypes + 1)


Set Income_UnitTypes[Income_MaxUnitTypes] = Market_1Gold


Set Income_UnitTypeIncome[Income_MaxUnitTypes] = 150


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------


Set Income_MaxUnitTypes = (Income_MaxUnitTypes + 1)


Set Income_UnitTypes[Income_MaxUnitTypes] = Market_2Gold


Set Income_UnitTypeIncome[Income_MaxUnitTypes] = 250


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------


Set Income_MaxUnitTypes = (Income_MaxUnitTypes + 1)


Set Income_UnitTypes[Income_MaxUnitTypes] = Market_3Gold


Set Income_UnitTypeIncome[Income_MaxUnitTypes] = 350


-------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
Update income Counter

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


For each (Integer Income_Count) from 1 to Income_AmountOfPlayers, do (Actions)



Loop - Actions




Set Income_PlayerCurrentIncome[Income_Count] = 0




Set Income_Group = (Units owned by (Player(Income_Count)))




Unit Group - Pick every unit in Income_Group and do (Actions)





Loop - Actions






For each (Integer Income_Count2) from 1 to Income_MaxUnitTypes, do (Actions)







Loop - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(Unit-type of (Picked unit)) Equal to Income_UnitTypes[Income_Count2]










((Picked unit) is alive) Equal to True









Then - Actions










Set Income_PlayerCurrentIncome[Income_Count] = (Income_PlayerCurrentIncome[Income_Count] + Income_UnitTypeIncome[Income_Count2])









Else - Actions






Multiboard - Set the text for Income_Multiboard item in column Income_MultiboardIncomeColumn[Income_Count], row Income_MultiboardIncomeRow[Income_Count] to (String(Income_PlayerCurrentIncome[Income_Count]))






Multiboard - Hide Income_Multiboard






Multiboard - Show Income_Multiboard




Custom script: call DestroyGroup(udg_Income_Group)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




Income_SecondCount Greater than or equal to 30



Then - Actions




Set Income_SecondCount = 0




For each (Integer Income_ThirdCount) from 1 to Income_AmountOfPlayers, do (Actions)





Loop - Actions






Player - Add Income_PlayerCurrentIncome[Income_ThirdCount] to (Player(Income_ThirdCount)) Current gold



Else - Actions




Set Income_SecondCount = (Income_SecondCount + 2)
Apocalypses Income Counter

Ereignisse


Zeit - Every 2.00 seconds of game time

Bedingungen

Aktionen


For each (Integer LoopInt) from 1 to 5, do (Actions)



Schleifen - Aktionen




Set IncomeAmount[LoopInt] = 0




Set Group = (Units owned by (Player(LoopInt)) of type Market_1Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = (IncomeAmount[LoopInt] + 150)




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_2Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = (IncomeAmount[LoopInt] + 225)




Custom script: call DestroyGroup(udg_Group)




Set Group = (Units owned by (Player(LoopInt)) of type Market_3Gold)




Einheitengruppe - Pick every unit in Group and do (Actions)





Schleifen - Aktionen






Set IncomeAmount[LoopInt] = (IncomeAmount[LoopInt] + 305)




Custom script: call DestroyGroup(udg_Group)