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