how can I tell if enetity is hidden ?

Blitz3D Forums/Blitz3D Programming/how can I tell if enetity is hidden ?

Codemonger(Posted 2003) [#1]
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)


Beaker(Posted 2003) [#2]
You will have to track it yourself. It could make for a feature request tho. :)


(tu) sinu(Posted 2003) [#3]
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


DrakeX(Posted 2003) [#4]
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.


Akat(Posted 2003) [#5]
create a type that can hold the parameters...

type entity
field obj
field ...
field vis
endtype

vis can hold boolean parameter


(tu) sinu(Posted 2003) [#6]
"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.


Ziltch(Posted 2003) [#7]
Creating an Entity type is the best way.

Another way is storing info in the entity's name.


Akat(Posted 2003) [#8]
even powerful engine out there using type (C/C++) especially in collision detection (delete an object after collide)...