frame
frame
gets/sets the current frame number of the shape action.
Type: float number
Sample
Code
################ Get frame
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the
controller named Mouth
act = controller.actuators["Mouth"]
# get number of the current frame
frame = act.frame
################ Set frame
# get the controller
controller = GameLogic.getCurrentController()
# get the shape action actuator attached to the
controller named Mouth
act = controller.actuators["Mouth"]
# set number of the current frame
act.frame = 27.0
|