- Joined
- Jul 9, 2008
- Messages
- 253
Hello everyone,
So I am busy with this Nexus Wars style map but I stumbled into a problem.
After a couple of unit waves the game starts to lag and my frames drop. Perhaps there is a leak somewhere in my spawning triggers.
Please tell me if you see a leak, or a possible reason that could cause this problem.
Code:
So I am busy with this Nexus Wars style map but I stumbled into a problem.
After a couple of unit waves the game starts to lag and my frames drop. Perhaps there is a leak somewhere in my spawning triggers.
Please tell me if you see a leak, or a possible reason that could cause this problem.
Code:
-
Farm
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
- Set Spawn_Building = Farm
- Set Spawn_Unit = Footman
- Set Spawn_Integer = 10
- -------- -------------------- --------
-
Unit Group - Pick every unit in (Units in Map) and do (Actions)
-
Loop - Actions
- Set Unit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Unit) Equal to Spawn_Building
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer((Mana of Unit))) Equal to Spawn_Integer
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of Unit) is in (All allies of Player 11 (Dark Green))) Equal to True
-
Then - Actions
- Unit - Create 1 Spawn_Unit for Player 11 (Dark Green) at (Position of Unit) facing Default building facing degrees
- Set Spawn = (Last created unit)
- Unit - Order Spawn to Attack-Move To (Center of Team 2 Base <gen>)
- Custom script: set udg_Spawn = null
-
Else - Actions
- Unit - Create 1 Spawn_Unit for Player 12 (Brown) at (Position of Unit) facing Default building facing degrees
- Set Spawn = (Last created unit)
- Unit - Order Spawn to Attack-Move To (Center of Team 1 Base <gen>)
- Custom script: set udg_Spawn = null
-
If - Conditions
- Unit - Set mana of Unit to 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Custom script: set udg_Unit = null
-
Loop - Actions
- Custom script: call DestroyGroup( bj_lastCreatedGroup )
-
Events