Nearestobject at 2.5 times a second = bad
;D ;D
Try multiple simultaneous nearestObject calls (spanning over a circular area, size defined upon calling the function) in .2 sec intervals...
Anyway, the calls I was referring to can happen at least 5-7 times a second.. ;D :-X
Are not nearestObject though, 'just' storing/retrieving data with the set/getProperty...
I recently replaced a user action in someones addon that checked with NearestObject (something like every 0.4 seconds) with these function and there was a noticable improvent, lag wise.
I have to really start 'learning' to use this since this could actually get me rid of that above mentioned 'nearestObject abhorrence', and some other nearestObject hell I have going on...
All this pointer stuff is just too 'real coding' for my old rusted brain
*shivers/sweats as having some old C flashbacks..*
I was not sure about addons, but as I'm increasingly starting to use script events within addons, I have to take it into account.
If you issue addeventHandler in a script then removeAllEventHandlers will 'kill' it...
Not configged ones...
Also, I have not had any trouble with EHs at all..
Tried for example configging an eventHandler to a unit, adding the same event in the editor pointing to the same script as the configged one and both EHs were 'triggered' and both run their own instances of the same script...
But this is getting off the point