Module GameTypes :: Class BL_ActionActuator
[hide private]
[frames] | no frames]

Class BL_ActionActuator

source code

PyObjectPlus --+            
               |            
          CValue --+        
                   |        
     SCA_ILogicBrick --+    
                       |    
           SCA_IActuator --+
                           |
                          BL_ActionActuator

Action Actuators apply an action to an actor.

Instance Methods [hide private]
 
setChannel(channel, matrix)
Alternative to the 2 arguments, 4 arguments (channel, matrix, loc, size, quat) are also supported.
source code
tuple
getChannel(channel)
Returns: (loc, size, quat)
source code
    Deprecated
 
setAction(action, reset=True)
Sets the current action.
source code
 
setStart(start)
Specifies the starting frame of the animation.
source code
 
setEnd(end)
Specifies the ending frame of the animation.
source code
 
setBlendin(blendin)
Specifies the number of frames of animation to generate when making transitions between actions.
source code
 
setPriority(priority)
Sets the priority of this actuator.
source code
 
setFrame(frame)
Sets the current frame for the animation.
source code
 
setProperty(prop)
Sets the property to be used in FromProp playback mode.
source code
 
setBlendtime(blendtime)
Sets the internal frame timer.
source code
 
setType(mode)
Sets the operation mode of the actuator
source code
 
setContinue(cont)
Set the actions continue option True or False.
source code
integer
getType()
Returns the operation mode of the actuator
source code
bool
getContinue()
When True, the action will always play from where last left off, otherwise negative events to this actuator will reset it to its start frame.
source code
string
getAction()
getAction() returns the name of the action associated with this actuator.
source code
float
getStart()
Returns the starting frame of the action.
source code
float
getEnd()
Returns the last frame of the action.
source code
float
getBlendin()
Returns the number of interpolation animation frames to be generated when this actuator is triggered.
source code
integer
getPriority()
Returns the priority for this actuator.
source code
float
getFrame()
Returns the current frame number.
source code
string
getProperty()
Returns the name of the property to be used in FromProp mode.
source code
 
setFrameProperty(prop) source code
string
getFrameProperty()
Returns the name of the property that is set to the current frame number.
source code
    Inherited from SCA_ILogicBrick
integer
getExecutePriority()
Gets the execution priority of this logic brick.
source code
KX_GameObject
getOwner()
Gets the game object associated with this logic brick.
source code
 
setExecutePriority(priority)
Sets the priority of this logic brick.
source code
    Inherited from CValue
string
getName()
Returns the name of the CValue.
source code
    Inherited from PyObjectPlus
bool
isA(game_type)
Check if this is a type or a subtype game_type.
source code
Instance Variables [hide private]
string action
The name of the action to set as the current action.
float blendIn
Specifies the number of frames of animation to generate when making transitions between actions.
float blendTime
Sets the internal frame timer.
list of strings channelNames
A list of channel names that may be used with setChannel and getChannel
float frame
Sets the current frame for the animation.
float frameEnd
Specifies the ending frame of the animation.
string framePropName
The name of the property that is set to the current frame number.
float frameStart
Specifies the starting frame of the animation.
integer mode
The operation mode of the actuator.
integer priority
Sets the priority of this actuator.
string propName
Sets the property to be used in FromProp playback mode.
boolean useContinue
The actions continue option, True or False.
    Inherited from SCA_ILogicBrick
int executePriority
This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first).
string name
The name of this CValue derived object (read-only).
KX_GameObject or None in exceptional cases. owner
The game object this logic brick is attached to (read-only).
    Inherited from PyObjectPlus
bool invalid
Test if the object has been freed by the game engine and is no longer valid.
Method Details [hide private]

setChannel(channel, matrix)

source code 
Alternative to the 2 arguments, 4 arguments (channel, matrix, loc, size, quat) are also supported.
Parameters:
  • channel (string) - A string specifying the name of the bone channel, error raised if not in channelNames.
  • matrix (list [[float]]) - A 4x4 matrix specifying the overriding transformation as an offset from the bone's rest position.

Note: These values are relative to the bones rest position, currently the api has no way to get this info (which is annoying), but can be worked around by using bones with a rest pose that has no translation.

getChannel(channel)

source code 
Parameters:
  • channel (string) - A string specifying the name of the bone channel. error raised if not in channelNames.
Returns: tuple
(loc, size, quat)

setAction(action, reset=True)

source code 
Sets the current action.
Parameters:
  • action (string) - The name of the action to set as the current action.
  • reset - Optional parameter indicating whether to reset the blend timer or not. A value of 1 indicates that the timer should be reset. A value of 0 will leave it unchanged. If reset is not specified, the timer will be reset.

Deprecated: use the action property

setStart(start)

source code 
Specifies the starting frame of the animation.
Parameters:
  • start (float) - the starting frame of the animation

Deprecated: Use the frameStart property

setEnd(end)

source code 
Specifies the ending frame of the animation.
Parameters:
  • end (float) - the ending frame of the animation

Deprecated: use the frameEnd property

setBlendin(blendin)

source code 
Specifies the number of frames of animation to generate when making transitions between actions.
Parameters:
  • blendin (float) - the number of frames in transition.

Deprecated: use the blendIn property

setPriority(priority)

source code 
Sets the priority of this actuator.
Parameters:
  • priority (integer) - Specifies the new priority. Actuators will lower priority numbers will override actuators with higher numbers.

Deprecated: Use use the priority property

setFrame(frame)

source code 
Sets the current frame for the animation.
Parameters:
  • frame (float) - Specifies the new current frame for the animation

Deprecated: use the frame property

setProperty(prop)

source code 
Sets the property to be used in FromProp playback mode.
Parameters:
  • prop (string.) - the name of the property to use.

Deprecated: use the property property

setBlendtime(blendtime)

source code 

Sets the internal frame timer.

Allows the script to directly modify the internal timer used when generating transitions between actions.
Parameters:
  • blendtime (float) - The new time. This parameter must be in the range from 0.0 to 1.0.

Deprecated: use the blendTime property

setType(mode)

source code 
Sets the operation mode of the actuator
Parameters:
  • mode (integer) - KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND

Deprecated: use the type property

setContinue(cont)

source code 
Set the actions continue option True or False. see getContinue.
Parameters:
  • cont (bool) - The continue option.

Deprecated: use the useContinue property

getType()

source code 
Returns the operation mode of the actuator
Returns: integer
KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND

Deprecated: use the type property

getContinue()

source code 
When True, the action will always play from where last left off, otherwise negative events to this actuator will reset it to its start frame.
Returns: bool

Deprecated: use the useContinue property

getAction()

source code 
getAction() returns the name of the action associated with this actuator.
Returns: string

Deprecated: use the action property

getStart()

source code 
Returns the starting frame of the action.
Returns: float

Deprecated: use the frameStart property

getEnd()

source code 
Returns the last frame of the action.
Returns: float

Deprecated: use the frameEnd property

getBlendin()

source code 
Returns the number of interpolation animation frames to be generated when this actuator is triggered.
Returns: float

Deprecated: use the blendIn property

getPriority()

source code 
Returns the priority for this actuator. Actuators with lower Priority numbers will override actuators with higher numbers.
Returns: integer

Deprecated: use the priority property

getFrame()

source code 
Returns the current frame number.
Returns: float

Deprecated: use the frame property

getProperty()

source code 
Returns the name of the property to be used in FromProp mode.
Returns: string

Deprecated: use the property property

setFrameProperty(prop)

source code 
Parameters:
  • prop (string) - A string specifying the property of the object that will be updated with the action frame number.

Deprecated: use the framePropName property

getFrameProperty()

source code 
Returns the name of the property that is set to the current frame number.
Returns: string

Deprecated: use the framePropName property


Instance Variable Details [hide private]

blendTime

Sets the internal frame timer. This property must be in the range from 0.0 to blendIn.
Type:
float

mode

The operation mode of the actuator. KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND
Type:
integer

priority

Sets the priority of this actuator. Actuators will lower priority numbers will override actuators with higher numbers.
Type:
integer

useContinue

The actions continue option, True or False. When True, the action will always play from where last left off, otherwise negative events to this actuator will reset it to its start frame.
Type:
boolean