| Class KX_SCA_ReplaceMeshActuator (2.48) |
|
|
| getMesh |
setMesh |
| instantReplaceMesh |
----------
|
|
|
|
| getExecutePriority |
setExecutePriority |
| getOwner |
---------- |
|
|
getMesh
getMesh()
Returns the name of the mesh that will replace the current mesh.
Return type: string
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the replace mesh actuator attached to the controller
named act
act = controller.getActuator("act")
# get name of replacement mesh
name = act.getMesh()
instantReplaceMesh
instantReplaceMesh()
Replaces the mesh without activating the actuator.
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the replace mesh actuator attached to the controller
named act
act = controller.getActuator("act")
# set the name of the mesh
act.setMesh("steelPlate")
# replace it now
act.instantReplaceMesh()
setMesh
setMesh(name)
Sets the name of the mesh that will be replacing the mesh in use.
name:
Type:
string
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the replace mesh actuator attached to the controller
named act
act = controller.getActuator("act")
# set the name of the mesh
act.setMesh("steelPlate")
# use it
GameLogic.addActiveActuator( act, True)
|