Handles
Blitz3D Forums/Blitz3D Beginners Area/Handles
| ||
I'm curious about something, are handles just integers? Like if I assign a handle to an entity or mesh, and I get rid of the handle itself, (not delete the entity), and assign the handle to another variable, would it still function normally? I'm thinking of making an accessor for a type that holds an entity handle. I'm also going to probably create a temp variable store it into that while creating, and then pass it to my type field for the entity, would this work? |
| ||
Handles are just variables holding Ints. If you re-use handle names you must be careful to free the object/media it points to first. |
| ||
idon't want to reuse handle names, i want to use temporary handle variables... because my type has a field for entities...Type TGameObject Field m_entity End Type temp = CreateCube() SetGameObjectEntity( gameobject, temp ) temp = 0 Essentially m_entity = temp - as it will hold the handle |
| ||
You can set m_entity=temp then reset temp. What problem are you getting when you try it? |
| ||
i'm just asking if this is ok to do. |