Free character entity from Type collection

Blitz3D Forums/Blitz3D Programming/Free character entity from Type collection

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.

Mayaman is right with the Delete command, it only erases handles. I've had this problem many times and have found it to be an easy fix. Here's what I'd do:

For Troll.enemy=Each enemy
If Troll\Die=True and Troll\gone=False
Delete Troll
Freeentity Troll\model
Troll\gone=True
end if
Next


Adding the troll\gone field ensures that the computer doesn't try to delete or free data that doesn't exist anymore.

EDIT: Oops, sorry about that mixup (Duh :))!