mode
mode
gets/sets the shape action playback mode.
Type: integer
0 =
KX_ACTIONACT_PLAY
1 =
2 = KX_ACTIONACT_FLIPPER
3 = KX_ACTIONACT_LOOPSTOP
4 = KX_ACTIONACT_LOOPEND
5 =
6 = KX_ACTIONACT_PROPERTY
Sample Code
################ Get mode
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the
controller named Mouth
act = controller.actuators["Mouth"]
# get playback type
actionType = act.mode
################ Set mode
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the
controller named Mouth
act = controller.actuators["Mouth"]
# set playback type
act.mode = 2
|