- Joined
- Aug 7, 2004
- Messages
- 7
i have latley been seriously concerned w/ the memory leaks in my map, and have read a tutorial on how to get rid of them, BUT one thing goes seriously wrong in my triggers; I basicly do the trigger like this:
EVENTS:-Unit starts the effect of an ability
CONDITIONS:-Ability being cast equal to <ABILITY>
ACTIONS:-Set Point_Generic = Position of casting unit
-Pick every unit within 300 of Point_Generic and do actions: Add unit to Group_Generic
-Pick every unit in Group Generic and do actions: <ACTIONS>
-Custom script: call RemoveLocation( udg_Point_Generic )
-Custom script: call DestroyGroup( udg_Group_Generic )
and it works ONCE and only once, I'm pretty sure the reason it only works once is that I completly destroy the point and group w/ the custom script, and the trigger runs more than once so it CANT find the variables....but if i leave out the custom script then I'll have a large amount of memory leaks, how can i "recycle" or "recall" the variables, is there an alternative GUI or custom script i can use that will allow the variables to be recycled?
EVENTS:-Unit starts the effect of an ability
CONDITIONS:-Ability being cast equal to <ABILITY>
ACTIONS:-Set Point_Generic = Position of casting unit
-Pick every unit within 300 of Point_Generic and do actions: Add unit to Group_Generic
-Pick every unit in Group Generic and do actions: <ACTIONS>
-Custom script: call RemoveLocation( udg_Point_Generic )
-Custom script: call DestroyGroup( udg_Group_Generic )
and it works ONCE and only once, I'm pretty sure the reason it only works once is that I completly destroy the point and group w/ the custom script, and the trigger runs more than once so it CANT find the variables....but if i leave out the custom script then I'll have a large amount of memory leaks, how can i "recycle" or "recall" the variables, is there an alternative GUI or custom script i can use that will allow the variables to be recycled?