- Joined
- Jul 12, 2017
- Messages
- 139
So my map has been lagging from time to time, probably due to a lot of enemies at once and this trigger moves the certain type of enemies. I suspect as this is the only periodic time trigger I have which moves a lot of unit at once, it may cause the massive lag but how do I fix it? Is this trigger really the problem?
Thank you in advance.
Thank you in advance.
-
Enemies Attack Move
-
Events
- Time - Every 30.00 seconds of game time
- Conditions
-
Actions
- Set VariableSet UnitGroup1 = (Units in (Playable map area) matching (((Matching unit) belongs to an ally of Player 21 (Coal).) Equal to True))
- Set VariableSet UnitGroup2 = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of Player 21 (Coal).) Equal to True))
- Set VariableSet Point1 = (Position of (Random unit from UnitGroup2))
-
Unit Group - Pick every unit in UnitGroup1 and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Not equal to Player 17 (Wheat)
- (Owner of (Picked unit)) Not equal to Player 24 (Peanut)
-
Then - Actions
- Unit - Order (Picked unit) to Attack-Move To Point1
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_Point1)
- Custom script: call DestroyGroup(udg_UnitGroup1)
- Custom script: call DestroyGroup(udg_UnitGroup2)
-
Events