Methods:
getAction setBlendin
getBlendin setBlendtime
getEnd setEnd
getFrame setFrame
getFrameProperty setFrameProperty
getPriority setPriority
getProperty setProperty
getStart setStart
getType setType
setAction ----------
Variables:
---------- ----------
Constants:
---------- ----------
Inherited
Methods:
getExecutePriority isA
getOwner setExecutePriority
getName ----------



Instance Methods

getAction

getAction()

Returns the name of the action.

Return type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getBlendin

getBlendin()

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

Return type:  float number

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getEnd

getEnd()

Returns the number of the last frame of the shape action.

Return type:  float number

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getFrame

getFrame()

Returns the current frame number of the shape action.

Return type: float number

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getFrameProperty

getFrameProperty()

Returns the name of the Frame Property.

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

Return type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getPriority

getPriority()

Returns the priority for this shape action.

Return type:  integer

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# get the priority
priority = act.getPriority()

getProperty

getProperty()

Returns the name of the property.  

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

Return type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getStart

getStart()

Returns the starting frame of the shape action.

Return type:  float number.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

getType

getType()

Returns the shape 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 shape action actuator named Mouth
act = controller.getActuator("Mouth")

# get playback type
actionType = act.getType()

setAction

setAction(action, reset = True)

Sets the name of the shape 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 shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

# use it
GameLogic.addActiveActuator(act, True)

setBlendin

setBlendin(blendin)

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

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set blendin frames
act.setBlendin(5.0)

setBlendtime

setBlendtime(blendtime)

Sets the internal frame timer.

blendtime:
Type:  float number.
Range is 0.0 to 1.0

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set Blendtime
act.setBlendtime(0.5)

setEnd

setEnd(end)

Sets the end frame of the shape action.

end:
Type:   float number.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set the end
act.setEnd(15.0)

setFrame

setFrame(frame)

Sets the current frame for the shape action.

frame:
Type:  float number.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set the frame
act.setFrame(12.0)

setFrameProperty

setFrameProperty(propName)

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

Type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

setPriority

setPriority(priority)

Sets the priority for this shape action.

priority:
Type:  integer.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set priority
act.setPriority(1)

setProperty

setProperty(prop)

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

prop:
Type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

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

setStart

setStart(start)

Sets the starting frame of the shape action.

start:
Type:  float number.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set start frame
act.setStart(10.0)

setType

setType(operationmode)

Sets the shape 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 shape action actuator named Mouth
act = controller.getActuator("Mouth")

# set playback type
act.setType(0)



Instance Methods: Inherited

getExecutePriority

getExecutePriority()

Gets the execute priority of the logic brick

Return Type:  integer

Doesn't work:
Crashes Blender

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

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

# get brick priority
priority = act.getExecutePriority()

getOwner

getOwner()

Gets the game object that owns the logic brick.

Return Type:  KX_GameObject

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

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

# get brick owner
owner = act.getOwner()

setExecutePriority

setExecutePriority(priority)

Sets the execution priority of the logic brick.

priority:
   Type:  integer
0 is first
1 is second
etc.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

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

# set brick priority to be first
act.setExecutePriority(0)





isA

isA(Type)

Checks the Object type.
(KX_GameObject, SCA_ILogicBrick, KX_Scene, etc.)

Type:  String

Return Type:  Bool
1 = True
0 = False

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the object controller attached to
owner = controller.getOwner()

# is owner a GameObject?
gameObject = owner.isA("KX_GameObject")





getName

getName()

Returns the name of actuator

Return Type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get a list of the attached actuators 
actList = controller.getActuators()

# loop through the list of actuators
for act in actList:

# look for an actuator named "RocketMotion"
if act.getName() == "RocketMotion":

# use it
GameLogic.addActiveActuator(act, True)

# Done.  Break out of loop
break


Blender 3D
Game Engine
Rapid prototyping for 3D games. Test realtime 3D gameplay without having to compile the game code. 3D game models automatically added.  GLSL shaders. Normal Mapping and Parallax Mapping. All OpenGL Lighting modes. This includes transparencies, animated and reflection mapped textures. Multiple textures and materials. UV mapping. Per-pixel lighting and dynamic lighting.  Uses Bullet Physics. Soft body dynamics. Rigid body dynamics. Collision detection and dynamics simulation. Collision bounds of all types. Car physics engine with full support for vehicle dynamics. (Spring reactions, stiffness, damping, tire friction etc.).