visibility
visibility
gets/sets if the object visible or invisible.
Type: bool
True or 1 = visible
False or 0 = invisible
Sample
Code
############### Get visibility
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named
Invisible
act = controller.actuators["Invisible"]
#get visibility
vis = act.visibility
############### Set visibility
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named
Invisible
act = controller.actuators["Invisible"]
# make object invisible
act.visibility = False
|