| Class BL_ShapeActionActuator (2.48) |
|
|
| getAction |
setBlendin |
| getBlendin |
setBlendtime |
| getEnd |
setEnd |
| getFrame |
setFrame |
| getFrameProperty |
setFrameProperty |
| getPriority |
setPriority |
| getProperty |
setProperty |
| getStart |
setStart |
| getType |
setType |
| setAction |
---------- |
|
|
|
|
| getExecutePriority |
setExecutePriority |
| getOwner |
---------- |
|
|
|
getAction
getAction()
Returns the
name of the action.
Return type: string
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the controller
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 attached to the controller
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 attached to the controller
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# 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 you created to hold the current frame
number of the action being played.
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the controller
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# get the priority
priority = act.getPriority()
getProperty
getProperty()
Gets the name of the property to be used when Property is the Shape
Action Playback type.
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 shape action actuator attached to the controller
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 attached to the controller
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# get playback type
actionType = act.getType()
setAction
setAction(action, reset)
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# use shape action named Smile
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 attached to the controller
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 attached to the controller
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 attached to the controller
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# 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 you created to hold the current frame
number of the
action being played.
Sample Code
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# set the actuator to use the frame property named smileStart
act.setFrameProperty("smileStart")
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# set priority
act.setPriority(1)
setProperty
setProperty(prop)
Sets the name of the property you created 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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# set the actuator to use the property: noSmile
act.setProperty("noSmile")
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 attached to the controller
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 attached to the controller
named Mouth
act = controller.getActuator("Mouth")
# set playback type
act.setType(0)
|