Right so I've trawled through my back catalogue and there are literally thousands of functions but there is no way I can shove them all in a single general purpose library, to be fair the vast majority of them are not really that generic so I need feedback from you guys on the set currently in the library, i.e. is that a useful enough set for now or have I missed something obvious? Would a generic entity counting function be useful for example, or how about a function to return a list of entities in order of distance from the player (or from a specified point) .
I did have a lot of AI specific functions but then Lee did his re-write and I'm not sure whether they are all still valid anymore.
I only want to include generic routines btw, nothing that only works with specific entities or rely on other modules/scripts being present other than the base set Lee delivers (and even then I try to avoid them if possible because he may change them at any time).
Edited:
I've added the 'list entities in order of distance one' as I was using that in quite a few places, it ignores any entity with no 'health' so should be useful for finding surviving enemies for example.
Word of warning, I've run out of simple functions, this latest one and probably any that follow will make your head spin unless you are really proficient in Lua.
With this function in place you don't really need a 'count entities' one as well, just call this one and use the size of the returned list as the count.
Edited:
New version, 'near' routine now includes x angle check. (found a newer version in my pickuppable script)
Been there, done that, got all the T-Shirts!