Entity exists?

BlitzMax Modules Forums/MiniB3D/Entity exists?

Will do. I agree that keeping track of it yourself is probably the best idea however it relates to the sound module I've been working on. When someone free's an entity it would be nice if the sound module could find out if the entity is gone and stop the sounds it's playing without the user having to stop the sounds before freeing the entity. Since I use the entity to figure out the positional stuff for the sound, if I try to update a sound attached to a freed entity it crashes the program. Good coding can prevent it, but I, being an idiot, like things to be more idiot proof if possible :0)

I haven't played around with hooks before but I think I could hook the freeentity command to also stop the sounds... but that adds code to every call to freeentity, and I only need to stop sounds if the entity is playing them... which my current system can handle in it's update routine just fine, if it could find out if the entity exists or not...

I'll dig around on the forums some more.