Lagg problems(cause of it)
I have tried my map just for fun a few times now, but all the test i have made i have been experiencing an increasing lagg after some time, maybe 30-40 min or more, that is where the lagg get's anoying. I also tried to just start map and let it run without me doing anything. And i got the same lagg that time aswell.
These 3 almost identical triggers might be the problem but i'm not sure, and therefore i ask you.
I checked the amounts of time these triggers are run after 30 minutes, and that is 10800 times if i'm not wrong. They are run each 0.5 sec, and all 3 triggers are checked at that interval, so then i have 6 runs each second, 360 each minute and 10800 times after 30 minutes.
The second 2 triggers are almost identical to the first one, but i post them anyway.
I have tried my map just for fun a few times now, but all the test i have made i have been experiencing an increasing lagg after some time, maybe 30-40 min or more, that is where the lagg get's anoying. I also tried to just start map and let it run without me doing anything. And i got the same lagg that time aswell.
These 3 almost identical triggers might be the problem but i'm not sure, and therefore i ask you.
I checked the amounts of time these triggers are run after 30 minutes, and that is 10800 times if i'm not wrong. They are run each 0.5 sec, and all 3 triggers are checked at that interval, so then i have 6 runs each second, 360 each minute and 10800 times after 30 minutes.
-
Gold
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Set regional_capitol[0] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Region capitol))
-
Unit Group - Pick every unit in regional_capitol[0] and do (Actions)
-
Loop - Actions
-
Set income_done[0] = (Position of (Picked unit))
-
Set gold_horse[0] = (Units within 100.00 of income_done[0] matching ((Unit-type of (Matching unit)) Equal to Gold Horse))
-
Unit Group - Pick every unit in gold_horse[0] and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
Unit Group - Remove all units of gold_horse[0] from gold_horse[0]
-
Custom script: call DestroyGroup (udg_gold_horse[0])
-
Custom script: call RemoveLocation (udg_income_done[0])
-
Player - Add 10 to (Owner of (Picked unit)) Current gold
-
-
-
Unit Group - Remove all units of regional_capitol[0] from regional_capitol[0]
-
Custom script: call DestroyGroup (udg_regional_capitol[0])
-
-
-
-
-
Food
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Set regional_capitol[1] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Region capitol))
-
Unit Group - Pick every unit in regional_capitol[1] and do (Actions)
-
Loop - Actions
-
Set income_done[1] = (Position of (Picked unit))
-
Set Food_horse[0] = (Units within 100.00 of income_done[1] matching ((Unit-type of (Matching unit)) Equal to Food Horse))
-
Unit Group - Pick every unit in Food_horse[0] and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
Unit Group - Remove all units of Food_horse[0] from Food_horse[0]
-
If (((Owner of (Picked unit)) Food cap) Equal to 20) then do (Do nothing) else do (Player - Add 1 to (Owner of (Picked unit)) Food cap)
-
Custom script: call DestroyGroup (udg_Food_horse[0])
-
Custom script: call RemoveLocation (udg_income_done[1])
-
-
-
Unit Group - Remove all units of regional_capitol[1] from regional_capitol[1]
-
Custom script: call DestroyGroup (udg_regional_capitol[1])
-
-
-
-
-
Wood
-
Events
-
Time - Every 0.50 seconds of game time
-
-
Conditions
-
Actions
-
Set regional_capitol[2] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Region capitol))
-
Unit Group - Pick every unit in regional_capitol[2] and do (Actions)
-
Loop - Actions
-
Set income_done[2] = (Position of (Picked unit))
-
Set Wood_horse[0] = (Units within 100.00 of income_done[2] matching ((Unit-type of (Matching unit)) Equal to Wood Horse))
-
Unit Group - Pick every unit in Wood_horse[0] and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
Unit Group - Remove all units of Wood_horse[0] from Wood_horse[0]
-
Custom script: call DestroyGroup (udg_Wood_horse[0])
-
Custom script: call RemoveLocation (udg_income_done[2])
-
Player - Add 10 to (Owner of (Picked unit)) Current lumber
-
-
-
Unit Group - Remove all units of regional_capitol[2] from regional_capitol[2]
-
Custom script: call DestroyGroup (udg_regional_capitol[2])
-
-
-
-
Last edited: