Hiding an Entity you collide with?

Blitz3D Forums/Blitz3D Beginners Area/Hiding an Entity you collide with?

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.

entitycollided() returns a regular entity handle so, yes, you can use hideentity to hide that entity, but no, you can't use tmphandle\points etc. to access it's properties. As I said, tmphandle would be an entity handle, not a pointer to any type instance you may wish to associate with that entity. The docs for entitycollided() talk about 'types' but these refer to collision types (set using entitytype) and not type variables. A bit confusing but the two are completely unrelated.

You may well have an 'entity' field in your type declaration that points to the associated entity but that link only works one way. To get the type instance associated to a given entity, you're going to have to search through your array of types until you get a match with the 'entity' field.

Or, if you're feeling more daring, you can get a type's handle ID with handle() and store it as the entity name. Then you can retrieve this later to find the associated type instance using the object() command.