
playAction(name, start, end, layer, priority, blendin, mode, layerWeight, ipoFlags, speed)
- Plays an action.
- Name of the action
- Type: string
- starting frame of the action
- Type: float number
- ending frame of the action
- Type: float number
- The layer that you want to get the frame from.
- Type: integer
- play this action if there isn’t an action playing in this layer with a higher (lower number) priority.
- Type: integer
- the amount of blending between this animation and the previous one on this layer.
- Type: float number
- the play mode.
- Type: KX_ACTION_MODE_PLAY, KX_ACTION_MODE_LOOP, or KX_ACTION_MODE_PING_PONG
- how much of the previous layer to use for blending (0 = add)
- Type: float
- flags for the old IPO behaviors (force, etc)
- Type: int bitfield
- the playback speed of the action.
- 1.0 = normal playback speed, 2.0 = twice normal speed, and so on
- Type: float number

Sample Code
################## play an action
# import bge
import bge
# get controller
cont = bge.logic.getCurrentController()
# get object that controller is attached to
obj = cont.owner
# set action variables
name = "WalkCycle"
start = 1.0
end = 20.0
layer = 3
priority = 1
blendin = 1.0
mode = KX_ACTION_MODE_LOOP
layerWeight = 0.0
ipoFlags = 1
speed = 1.0
# play an action
obj.playAction(name, start, end, layer, priority, blendin, mode, layerWeight, ipoFlags, speed)