framePropName
framePropName
Note:
To create a Frame Property,
use Add Property to add a property (type float or integer) to
the game object.
gets/sets the name of the Frame Property.
Return type: string
Sample
Code
################ Get framePropName
# get the controller
controller = GameLogic.getCurrentController()
# get object controller attached to
obj = controller.owner
# get the
actuator attached to controller named Walk
act = controller.actuators["Walk"]
# get the
name the frame property name
frameName = act.framePropName
# get current frame
currentFrame = obj["frameName"]
################ Set framePropName
# get the controller
controller = GameLogic.getCurrentController()
# get the
actuator attached to controller named Walk
act = controller.actuators["Walk"]
# set the name of the frame property name
act.framePropName = "currentFrame"
|