action
action
sets/gets the
name of the action.
Type: string
Sample
Code
#################### Get action
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the
controller named Mouth
act = controller.actuators["Mouth"]
# get the name of the shape action
name = act.action
#################### Set action
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the
controller named Mouth
act = controller.actuators["Mouth"]
# set the name of the shape action
act.action = "Smile"
|