yes a condition is a workarround, I just found it really sad that turning a trigger off only turns off the event actually.
I am trying to reduce process to keep my map well performing. So I'm turning off triggers that for example check for conditions on each "generic-unit is attacked event" until I really need them and turn them on. Just so that the condition doesn't have to be checked every time. I'm talking about my TD so I have a hilarious amount of attacks most of the time... but yes... checking a boolean is not much of a process I know.
However it is this kind of stuff... the thing above only requires to check an extra condition each wave now. Which isn't really anything but I wanted to get rid of it this way and it would be a nice tool if it wasn't only turning off the triggers event.
I just saw minor performance problems in lategame yesterday and so I'm cleaning my triggerwork a bit.
On this issue: I read that points(e.g. position of unit) leak, which is why I always define variables as points and then work with the variables. I am however not always using the custom script "call RemoveLocation (udg_MyPointVar)" to remove the point, because when I redefine "MyPointVar" all the time it shouldn't leak right? I think that points will only leak when I directly work with the points that I catch via GUI, but mb i'm wrong?
I mean I do: set MyPointVar = position of triggering unit
do action at MyPointVar
and next time the trigger runs it will do the same, so MyPointVar is always redefined so it doesn't store the old values. But I don't know if "position of triggering unit" still leaks.
I WOULD always use "call RemoveLocation (udg_MyPointVar)" but I also have point variables with arrays and I never figured which way I have to change the custom script that it can destroy a certain array position of a point. Please tell me if I should do a new topic :/