how can I tell if enetity is hidden ?
Blitz3D Forums/Blitz3D Programming/how can I tell if enetity is hidden ?
| ||
I was searching the forums, and looking through the docs and was just wandering if their is anyway to tell if an entity is hidden as opposed to keeping track seperately in an array or a type, what is hidden. like a isHidden() function ? (return true if entity is hidden) |
| ||
You will have to track it yourself. It could make for a feature request tho. :) |
| ||
just give the entity a value of 0 if hidden and 1 if not ie box = createbox() boxvisibility = 1 if keyhit(h) and boxvisibility = 1 hideentity box : boxvisibility = 0 endif if keyhit(j)) and boxvisibility = 0 showentity box : boxvisibility = 1 endif |
| ||
i'm beginning to think i should make an ENTITY type so that way we can keep track of all the stuff B3D already keeps track of but doesn't tell us. wait a second. that seems kinda redundant. |
| ||
create a type that can hold the parameters... type entity field obj field ... field vis endtype vis can hold boolean parameter |
| ||
"i'm beginning to think i should make an ENTITY type so that way we can keep track of all the stuff B3D already keeps track of but doesn't tell us. " that would be the best way. "create a type that can hold the parameters... " yep, that's what i do, just tried making it simpler without going into types. |
| ||
Creating an Entity type is the best way. Another way is storing info in the entity's name. |
| ||
even powerful engine out there using type (C/C++) especially in collision detection (delete an object after collide)... |