CopyEntity

Blitz3D Forums/Blitz3D Programming/CopyEntity

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Just for in case it's not the problem DJWoodgate just described:
When you use CopyEntity, it will return a handle. When the handle is zero, the entity wasn't created for some reason. Tho, this never happened to me.

Copyentity creates an instance of the original. Now when you remove the original, but keep the instance, there will be a new original. Although I am not sure if this is a ghost copy, somewhere stored intenally, or if it's gonna be one of the instances. If it's one of the instances, there may arise some problems when you continously delete the "new original" entity.

BTW: Whenever you free an entity in your code, you should set it's handle to zero. So you will be able at any time to check for the existance of an entity without to risk a MAV.