Class KX_SCA_ReplaceMeshActuator (2.48)


Methods
getMesh setMesh
instantReplaceMesh ----------
 
Variables
---------- ----------
 
Constants
---------- ----------

Inherited Methods:  Class SCA_ILogicBrick
getExecutePriority setExecutePriority
getOwner ----------

Inherited Methods:  Class PyObjectPlus
isA ----------

Inherited Methods:  Class Value
getName ----------



Methods



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)



Blender 3D
Game Engine