673 posts Sunny Singapore, the lil' red dot joined
#2
im not very sure about this, but does Turning Off and Turning On triggers help? lets say you dont need a trigger yet, so it will be initially turned off. just a suggestion. no gurantees.
yes, that does cause memory leaks. Whenever you call for a point, that leaks into memory if it is not properly removed and nullified.
What you need to do, is set a point equal to the center of the map, call that point, and then remove and nullify that point.
local location temploc set temploc = (Center of (Playable map area)) Unit - Create 5 Soldat for Player 1 (Red) at (temploc) facing Default building facing (270.0) degrees call removelocation (temploc) set temploc = null
Leaks are when something like a location/group/effect leak onto the ram memory for the rest of the game causing it to use up more procesing power to fetch the variable value so that the more leaked the more it lags when you create/fetch/handle a value (well atleast thats what my experiments proved). To stop leaks you must deastroy the variable value after you use it.
Lag is caused when your computer can not cope with the number of culuclations it is being ordered to perform per second. LEAKING DOESNT CAUSE LAG DIRECTLY! Leaking increases the processor load of you axcesing variales thuses making it lag worse the more the leaking function is run.
yes, that does cause memory leaks. Whenever you call for a point, that leaks into memory if it is not properly removed and nullified.
What you need to do, is set a point equal to the center of the map, call that point, and then remove and nullify that point.
local location temploc set temploc = (Center of (Playable map area)) Unit - Create 5 Soldat for Player 1 (Red) at (temploc) facing Default building facing (270.0) degrees call removelocation (temploc) set temploc = null
Actually, center of playable map doesnt leak, since that location never changes.
>>> How can i use the custom value function? What is it for and what i can do with it? <<<
A custom value is basically a variable attached to a unit. You can set a unit's custom value and it will remain on that unit until changed or the unit is removed, and you can refer to that number. I find it very useful.