Hello,
I have been a longtime stalker of this beautiful website which helped me ALOT during the years. Much praise!
My problem is the following:
I have a map (very very old one) which I still play to this day. When I play it with my friends, it works perfectly. When I add 1-2-3 AIs max, it still runs smoothly. However, when I add more than 3 AIs, it begins to lag. The more computers I add, the more it lags. It seems to me like the game lags a bit the first 5-10 minutes, and then more as the game goes on. It seems to have the symptoms of a memory leak.
It would be a dream if I could play with lets say 6-10 AIs without the delay.
I`m assuming (pretty much sure) the triggers are causing the lag. The problem is I don`t know which ones.
If it`s possible I`d like to link them all here (5 in total), maybe someone knows where the delay is coming from / what needs fixing.
I`ll start with the one which (to me) seems to be the most likely one to cause lag.
And the list of Actions goes on for every hero (16 lines per hero x16 heroes = 256 lines).
Also, there are 5 events (4 players + the 1st one). If the map has 12 players, there will be 13 events.
Could it be that it lags because a trigger has 256 lines of Action?
PS: In the trigger: Dark Bandit Knight is the hero, Holy Light (Bandit)1 is a unit spell (the map was made before they added levels to unit spells), and it works: the computer AI learns the spell and casts it regularly! ...but it lags if 4+ AIs are added
Any help would be greatly appreciated!
Thank you for reading this! Have a wonderful day!
I have been a longtime stalker of this beautiful website which helped me ALOT during the years. Much praise!
My problem is the following:
I have a map (very very old one) which I still play to this day. When I play it with my friends, it works perfectly. When I add 1-2-3 AIs max, it still runs smoothly. However, when I add more than 3 AIs, it begins to lag. The more computers I add, the more it lags. It seems to me like the game lags a bit the first 5-10 minutes, and then more as the game goes on. It seems to have the symptoms of a memory leak.
It would be a dream if I could play with lets say 6-10 AIs without the delay.
I`m assuming (pretty much sure) the triggers are causing the lag. The problem is I don`t know which ones.
If it`s possible I`d like to link them all here (5 in total), maybe someone knows where the delay is coming from / what needs fixing.
I`ll start with the one which (to me) seems to be the most likely one to cause lag.
-
AI
-
Events
- Unit - A unit enters (Playable map area)
- Unit - A unit owned by Player 1 (Red) Gains a level
- Unit - A unit owned by Player 2 (Blue) Gains a level
- Unit - A unit owned by Player 3 (Teal) Gains a level
- Unit - A unit owned by Player 4 (Purple) Gains a level
-
Conditions
- ((Owner of (Triggering unit)) controller) Equal to Computer
-
Actions
- If ((Unit-type of (Triggering unit)) Equal to Dark Bandit Knight) then do (If ((Hero level of (Triggering unit)) Equal to 1) then do (Unit - Add Holy Light (Bandit)1 to (Triggering unit)) else do (Do nothing)) else do (Do nothing)
- If ((Unit-type of (Triggering unit)) Equal to Dark Bandit Knight) then do (If ((Hero level of (Triggering unit)) Equal to 3) then do (Unit - Remove Holy Light (Bandit)1 from (Triggering unit)) else do (Do nothing)) else do (Do nothing)
- If ((Unit-type of (Triggering unit)) Equal to Dark Bandit Knight) then do (If ((Hero level of (Triggering unit)) Equal to 3) then do (Unit - Add Holy Light (Bandit)2 to (Triggering unit)) else do (Do nothing)) else do (Do nothing)
-
Events
And the list of Actions goes on for every hero (16 lines per hero x16 heroes = 256 lines).
Also, there are 5 events (4 players + the 1st one). If the map has 12 players, there will be 13 events.
Could it be that it lags because a trigger has 256 lines of Action?
PS: In the trigger: Dark Bandit Knight is the hero, Holy Light (Bandit)1 is a unit spell (the map was made before they added levels to unit spells), and it works: the computer AI learns the spell and casts it regularly! ...but it lags if 4+ AIs are added
Any help would be greatly appreciated!
Thank you for reading this! Have a wonderful day!