Class BL_ActionActuator (2.48)


Methods
getAction setBlendin
getBlendin setBlendtime
getContinue setChannel
getEnd setContinue
getFrame setEnd
getFrameProperty setFrame
getPriority setFrameProperty
getProperty setPriority
getStart setProperty
getType
setAction

 
Variables
---------- ----------

 
Constants
---------- ----------


Inherited Methods:  Class SCA_ILogicBrick
getExecutePriority setExecutePriority
getOwner ----------

Inherited Methods:  Class PyObjectPlus
isA ----------

Inherited Methods:  Class Value
getName ----------



Methods


getAction

getAction()

Returns the name of the action.

Return type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get the name of the action
action = act.getAction()

getBlendin

getBlendin()

Returns the number of frames to be used when blending this action with another.

Return type:  float 

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get number of frames used for the blendin
frames = act.getBlendin()

getContinue

getContinue()

Returns the status of the Action Actuator Continue button.

Return type:   Bool

1 = True:

Continue playing the the Action from the frame it was playing when the actuator was turned off (State System). 

0 = False:

Restart the Action.  Play it from the beginning.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# Continue from last frame played or restart?
continue_action = act.getContinue()

getEnd

getEnd()

Returns the number of the last frame of the action.

Return type:  float 

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get number of the last frame
endFrame = act.getEnd()

getFrame

getFrame()

Returns the current frame number.

Return type: float 

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get number of the current frame
frame = act.getFrame()

getFrameProperty

getFrameProperty()

Returns the name of the Frame Property.

Return type:  string

Note:

The Frame Property is the object property that holds the current frame number of the action being played.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get the name the current frame property
name = act.getFrameProperty()

getPriority

getPriority()

Returns the priority for this action

Return type:  integer

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get the priority
priority = act.getPriority()

getProperty

getProperty()

Returns the name of the property.  

Return type:  string

Note:

If there isn't a property, getProperty() will return an empty string.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get name of the property
name = act.getProperty()

getStart

getStart()

Returns the starting frame of the action.

Return type:  float

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get number of starting frame
startFrame = act.getStart()

getType

getType()

Returns the action playback type

Return 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 the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# get playback type
actionType = actuator.getType()

setAction

setAction(action, reset)

Sets the name of the action.

action:
Type:  string

reset:
Type:  bool

True or 1 resets the blend timer.
False or 0 leaves it unchanged.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set action
act.setAction("WalkCycle", True)

# use it
GameLogic.addActiveActuator(act, True)

Example Blend

Example Blend:    Action_Actuator.blend

(Uses setAction, setStart, setEnd, setType)

setBlendin

setBlendin(blendin)

Sets the number of frames to be used when blending this action with another.
 
blendin:
Type:   float

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set blendin frames
act.setBlendin(5.0)

setBlendtime

setBlendtime(blendtime)

Sets the internal frame timer.

blendtime
Type:  float
Range:  0.0 to 1.0

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set Blendtime
act.setBlendtime(0.5)

setChannel

setChannel(channel, matrix, mode)

Sets the bone channel.

channel:
Type:  string.
Name of the bone channel

matrix:
Type:  4x4 matrix.  (float values)

mode:
Type:  bool
   True or 1= armature/world space.
   False or 0 = bone space

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set the channel
act.setChannel("channel", matrix, False)

setContinue

setContinue(set)

Sets the action actuator Continue button.

set:
Type:   Bool
    1 or True
    0 or False

True = Continue playing the the Action from the frame it was playing when the actuator was turned off (State System).

False = Restart the Action.  Play it from the beginning.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# Set it to Continue from last frame played
act.setContinue(True)

setEnd

setEnd(end)

Sets the end frame of the action

end:
Type:   float

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set the end
act.setEnd(15.0)

setFrame

setFrame(frame)

Sets the current frame for the action.

frame:
Type:  float

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set the frame
act.setFrame(12.0)

setFrameProperty

setFrameProperty(propName)

Sets the name of the Frame Property.

Type:  string

Note:
The Frame Property is the object property that holds the current frame number of the action being played.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set the name of the frame property
act.setFrameProperty()

setPriority

setPriority(priority)

Sets the priority for this action.

priority:
Type:  integer

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set priority
act.setPriority(1)

setProperty

setProperty(prop)

Sets the name of the property to be used when Property is the Action Playback Type.

prop:
Type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set name of the property
act.setProperty("prop")

setStart

setStart(start)

Sets the starting frame

start:
Type:  float

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set start frame
act.setStart(10.0)

setType

setType(operationmode)

Sets the action playback type.

operationmode:
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 the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to controller named Walk
act = controller.getActuator("Walk")

# set playback type
act.setType(0)



Blender 3D
Game Engine