- Joined
- Jul 14, 2006
- Messages
- 292
Ok, here's the point. I made a map. It's a Maze Maker. 3 player make, 9 player run.
Really simple and a lot of ability in it. I tested it with a friend and some random player and, what happenned?
HEAVY LAGS
So I came here with some questions on Memory leaks. Questions like:
What need a variable?
As I think, only some things need variable:
Unit Group
Player Group
Item Group
(Any group)
Those have to be removed if they are to be used again. Removed this way:
call DestroyGroup(udg_unitorelseGroup)
call DestroyForce(udg_playerGroup)
Point
call RemoveLocation(udg_THEPoint)
Region
(I place my region on the map so I don't use this variable.)
And that's all!
In my map there are some laggy trigger like this one by exemple:
Really simple and a lot of ability in it. I tested it with a friend and some random player and, what happenned?
HEAVY LAGS
So I came here with some questions on Memory leaks. Questions like:
What need a variable?
As I think, only some things need variable:
Unit Group
Player Group
Item Group
(Any group)
Those have to be removed if they are to be used again. Removed this way:
call DestroyGroup(udg_unitorelseGroup)
call DestroyForce(udg_playerGroup)
Point
call RemoveLocation(udg_THEPoint)
Region
(I place my region on the map so I don't use this variable.)
And that's all!
In my map there are some laggy trigger like this one by exemple:
- Events
- Unit - A unit is Issued an order targeting a point
- Conditions
- (Unit-Type of (Ordered unit)) Equal to Mortar Volcano Team
- Actions
- Wait 0.05 seconds
- Unit - Order (Ordered unit) to Stop
- Unit - Order (Ordered unit) to face ((Facing of (Ordered unit)) + 10) over 0.00 seconds
- Wait 0.20 seconds
- Set VolcanoPoint = ((Position of (Ordered unit)) offset by 400.00 towards (Facing of (Ordered unit)) degrees)
- Unit - Order (Ordered unit) to Attack Ground VolcanoPoint
- Custom script: call RemoveLocation(udg_VolcanoPoint)