Class KX_GameActuator (2.48)


Methods
getFile setFile
 
Variables
---------- ----------
 
Constants
---------- ----------

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

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

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



Methods



getFile

getFile()

Returns the name of the blend file to load.

Type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to the controller named act
act = controller.getActuator("act")

# get name of blend file from actuator to be loaded
name = act.getFile()

setFile

setFile(filename)

Sets the name of the blend file to load.

filename:
Type is string

Note:
If it's in the same directory, just the name of the blend.
ie.  "myGame.blend"

If it's in a different directory, full path.
ie  "C:\\BlenderGames\\myGame.blend"

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator attached to the controller named act
act = controller.getActuator("act")

# set name of blend file to be loaded
act.setFile("Level2.blend")

# use the game actuator
GameLogic.addActiveActuator( act, True)



Blender 3D
Game Engine