Skip to content

Range.logic

Module to access logic functions, imported automatically into the python controllers namespace.

# To get the controller thats running this python script:
cont = Range.logic.getCurrentController() # Range.logic is automatically imported
# To get the game object this controller is on:
obj = cont.owner

KX_GameObject and KX_Camera or KX_LightObject methods are available depending on the type of object

# To get a sensor linked to this controller.
# "sensorname" is the name of the sensor as defined in the Blender interface.
# +---------------------+ +--------+
# | Sensor "sensorname" +--+ Python +
# +---------------------+ +--------+
sens = cont.sensors["sensorname"]
# To get a sequence of all sensors:
sensors = co.sensors

See the sensor’s reference for available methods:

  • KX_MouseFocusSensor
  • KX_NearSensor
  • KX_NetworkMessageSensor
  • KX_RadarSensor
  • KX_RaySensor
  • KX_CollisionSensor
  • SCA_DelaySensor
  • SCA_JoystickSensor
  • SCA_KeyboardSensor
  • SCA_MouseSensor
  • SCA_PropertySensor
  • SCA_RandomSensor You can also access actuators linked to the controller
# To get an actuator attached to the controller:
# +--------+ +-------------------------+
# + Python +--+ Actuator "actuatorname" |
# +--------+ +-------------------------+
actuator = co.actuators["actuatorname"]
# Activate an actuator
controller.activate(actuator)

See the actuator’s reference for available methods

  • BL_ActionActuator
  • KX_CameraActuator
  • KX_ConstraintActuator
  • KX_GameActuator
  • KX_MouseActuator
  • KX_NetworkMessageActuator
  • KX_ObjectActuator
  • KX_ParentActuator
  • KX_SCA_AddObjectActuator
  • KX_SCA_DynamicActuator
  • KX_SCA_EndObjectActuator
  • KX_SCA_ReplaceMeshActuator
  • KX_SceneActuator
  • KX_SoundActuator
  • KX_StateActuator
  • KX_TrackToActuator
  • KX_VisibilityActuator
  • SCA_2DFilterActuator
  • SCA_PropertyActuator
  • SCA_RandomActuator Most logic brick’s methods are accessors for the properties available in the logic buttons. Consult the logic bricks documentation for more information on how each logic brick works.

There are also methods to access the current Range.types.KX_Scene

# Get the current scene
scene = Range.logic.getCurrentScene()
# Get the current camera
cam = scene.active_camera

Matricies as used by the game engine are row major matrix[row][col] = float

Range.types.KX_Camera has some examples using matrices.

A dictionary that is saved between loading blend files so you can use it to store inventory and other variables you want to store between scenes and blend files. It can also be written to a file and loaded later on with the game load/save actuators.

The current keyboard wrapped in an SCA_PythonKeyboard object.

The current mouse wrapped in an SCA_PythonMouse object.

Device motion sensors (gyroscope, accelerometer, tilt) wrapped in a KX_PythonMotion object.

A list of attached SCA_PythonJoystick. The list size is the maximum number of supported joysticks. If no joystick is available for a given slot, the slot is set to None.

Gets the Python controller associated with this Python script.

Return type: Range.types.SCA_PythonController

Gets the current Scene.

Return type: Range.types.KX_Scene

Gets a list of the current scenes loaded in the game engine.

Return type: list of Range.types.KX_Scene

Gets a list of the scene’s names not loaded in the game engine.

Return type: list of string

Loads Range.logic.globalDict from a file.

Saves Range.logic.globalDict to a file.

Loads the blend file.

  • blend: The name of the blend file
    • type: string

Ends the current game.

Restarts the current game by reloading the .blend file (the last saved version, not what is currently running).

LibLoad(blend, type, data, load_actions=False, verbose=False, load_scripts=True, asynchronous=False, scene=None)

Section titled “LibLoad(blend, type, data, load_actions=False, verbose=False, load_scripts=True, asynchronous=False, scene=None)”

Converts the all of the datablocks of the given type from the given blend.

  • blend: The path to the blend file (or the name to use for the library if data is supplied)
    • type: string
  • type: The datablock type (currently only “Action”, “Mesh” and “Scene” are supported)
    • type: string
  • data: Binary data from a blend file (optional)
    • type: bytes
  • load_actions: Search for and load all actions in a given Scene and not just the “active” actions (Scene type only)
    • type: bool
  • verbose: Whether or not to print debugging information (e.g., “SceneName: Scene”)
    • type: bool
  • load_scripts: Whether or not to load text datablocks as well (can be disabled for some extra security)
    • type: bool
  • asynchronous: Whether or not to do the loading asynchronously (in another thread). Only the “Scene” type is currently supported for this feature.
    • type: bool
  • scene: Scene to merge loaded data to, if None use the current scene.
    • type: Range.types.KX_Scene or string

Return type: Range.types.KX_LibLoadStatus

Uses existing datablock data and loads in as a new library.

  • name: A unique library name used for removal later
    • type: string
  • type: The datablock type (currently only “Mesh” is supported)
    • type: string
  • data: A list of names of the datablocks to load
    • type: list of strings

Frees a library, removing all objects and meshes from the currently active scenes.

  • name: The name of the library to free (the name used in LibNew)
    • type: string

Returns a list of currently loaded libraries.

Return type: list [str]

Time per frame, in milliseconds, that asynchronous LibLoad may spend merging loaded libraries into the scene (textures, shaders, objects). The default of 8 keeps the game frame rate; a loading screen can raise it (e.g. 30) to finish sooner at a lower frame rate, then set it back.

  • ms: New budget; omitted, only returns the current one.
    • type: float

Returns: The current budget in milliseconds.

Return type: float

addScene(name, overlay=1, asynchronous=False)

Section titled “addScene(name, overlay=1, asynchronous=False)”

Loads a scene into the game engine.

  • name: The name of the scene
    • type: string
  • overlay: Overlay or underlay (optional)
    • type: integer
  • asynchronous: Compile the scene shaders a few per frame (budget of setLibLoadFrameBudget) before the scene joins getSceneList, so a loading screen keeps drawing; its logic starts only then.
    • type: boolean

sendMessage(subject, body=“”, to=“”, message_from=“”)

Section titled “sendMessage(subject, body=“”, to=“”, message_from=“”)”

Sends a message to sensors in any active scene.

  • subject: The subject of the message
    • type: string
  • body: The body of the message (optional)
    • type: string
  • to: The name of the object to send the message to (optional)
    • type: string
  • message_from: The name of the object that the message is coming from (optional)
    • type: string

Sets the world gravity.

  • gravity: gravity vector
    • type: Vector((fx, fy, fz))

Returns a 512 point list from the sound card. This only works if the fmod sound driver is being used.

Return type: list [float], len(getSpectrum()) == 512

Gets the maximum number of logic frames per render frame.

Returns: The maximum number of logic frames per render frame

Return type: integer

Sets the maximum number of logic frames that are executed per render frame. This does not affect the physic system that still runs at full frame rate.

  • maxlogic: The new maximum number of logic frames per render frame. Valid values: 1..5
    • type: integer

Gets the value last passed to setMaxPhysicsFrame.

Returns: The value last set (default: 5)

Return type: integer

Stores the value for later retrieval via getMaxPhysicsFrame. Historically documented as the maximum number of physics timesteps executed per render frame, but no code path in the engine reads it for that purpose.

  • maxphysics: The new maximum number of physics timestep per render frame. Valid values: 1..5.
    • type: integer

Gets the logic update frequency.

Returns: The logic frequency in Hz

Return type: float

Sets the logic update frequency.

The logic update frequency is the number of times logic bricks are executed every second. The default is 60 Hz.

  • ticrate: The new logic update frequency (in Hz).
    • type: float

Gets the physics update frequency

Returns: The physics update frequency in Hz

Return type: float

Sets the physics update frequency

The physics update frequency is the number of times the physics system is executed every second. The default is 60 Hz.

  • ticrate: The new update frequency (in Hz).
    • type: float

Gets the key used to exit the game engine

Returns: The key (defaults to Range.events.ESCKEY)

Return type: int

Sets the key used to exit the game engine

  • key: A key constant from Range.events
    • type: int

Render next frame (if Python has control)

Sets the global flag that controls the render of the scene. If True, the render is done after the logic frame. If False, the render is skipped and another logic frame starts immediately.

  • render: the render flag
    • type: bool

Get the current value of the global render flag

Returns: The flag value

Return type: bool

Get the current BGE render time, in seconds. The BGE render time is the simulation time corresponding to the next scene that will be rendered.

Return type: double

Get the current BGE frame time, in seconds. The BGE frame time is the simulation time corresponding to the current call of the logic system. Generally speaking, it is what the user is interested in.

Return type: double

Get the number of real (system-clock) seconds elapsed since the beginning of the simulation.

Return type: double

Get the time multiplier between real-time and simulation time. The default value is 1.0. A value greater than 1.0 means that the simulation is going faster than real-time, a value lower than 1.0 means that the simulation is going slower than real-time.

Return type: double

Set the time multiplier between real-time and simulation time. A value greater than 1.0 means that the simulation is going faster than real-time, a value lower than 1.0 means that the simulation is going slower than real-time. Note that a too large value may lead to some physics instabilities.

  • time_scale: The new time multiplier.

Get if the BGE use the inner BGE clock, or rely or on an external clock. The default is to use the inner BGE clock.

Return type: bool

Set if the BGE use the inner BGE clock, or rely or on an external clock. If the user selects the use of an external clock, he should call regularly the setClockTime method.

  • use_external_clock: the new setting

Set the next value of the simulation clock. It is preferable to use this method from a custom main function in python, as calling it in the logic block can easily lead to a blocked system (if the time does not advance enough to run at least the next logic step).

  • new_time: the next value of the BGE clock (in second).

Converts a blender internal path into a proper file system path.

Use / as directory separator in path You can use ‘//’ at the start of the string to define a relative path; Blender replaces that string by the directory of the current .blend or runtime file to make a full path name. The function also converts the directory separator to the local file system format.

  • path: The path string to be converted/expanded.
    • type: string

Returns: The converted string

Return type: string

Gets the estimated/average framerate for all the active scenes, not only the current scene.

Returns: The estimated average framerate in frames per second

Return type: float

Returns a list of blend files in the same directory as the open blend file, or from using the option argument.

  • path: Optional directory argument, will be expanded (like expandPath) into the full path.
    • type: string

Returns: A list of filenames, with no directory prefix

Return type: list

Returns a random floating point value in the range [0 - 1)

Prints GL Extension Info into the console

Prints engine statistics into the console

Returns a Python dictionary that contains the same information as the on screen profiler. The keys are the profiler categories and the values are tuples with the first element being time taken (in ms) and the second element being the percentage of total time.

Returns a Python dictionary of integer counters from the last completed frame, the same numbers the Debug Mode render queries show. Unlike the frame times from getProfileInfo, these do not depend on the hardware or the clock, so they are what A/B tests should compare.

Rasterizer counters, covering every pass of the frame (main camera, shadows, 2D filters):

  • drawCalls – draw calls issued.
  • materialBinds – material (shader program) binds.
  • lightBinds – uploads of the scene light and shadow lamp uniforms. The light set is constant per light layer, so this counts how often the same values were re-uploaded.

Counters of the active scene:

  • cullingTotal, cullingTested, cullingVisible – objects in the render list, tested against the frustum/DBVT, and found visible, from the last main-camera culling pass.
  • lightsTotal, lightsShadowUpdated, shadowPasses – lights in the scene, lights whose shadow buffer was refreshed, and shadow passes rendered (each cascade split counts as one).
  • sensors, controllersTriggered, actuatorsUpdated – registered sensors, and controllers/actuators run on the logic frame. Beware that these two are counted as the frame runs, and a Python controller calling this function is itself part of that frame: it sees only what ran before it, so from a controller the value is usually 0. The Debug Mode overlay reads them after the frame and shows the complete count. The rasterizer and culling counters above have no such caveat – they are always from the last completed frame.

True value used by some modules.

False value used by some modules.

Sensor state: off.

Sensor state: just turned on this frame.

Sensor state: still on.

See Range.types.KX_ArmatureSensor.type

Detect that the constraint is changing state (active/inactive)

Value: 0

Detect that the constraint linear error is above a threshold

Value: 1

Detect that the constraint linear error is below a threshold

Value: 2

Detect that the constraint rotation error is above a threshold

Value: 3

Detect that the constraint rotation error is below a threshold

Value: 4

Activate when the property is equal to the sensor value.

Value: 1

Activate when the property is not equal to the sensor value.

Value: 2

Activate when the property is between the specified limits.

Value: 3

Activate when the property changes

Value: 4

Activate when the expression matches

Value: 5

Activate when the property is less than the sensor value

Value: 6

Activate when the property is greater than the sensor value

Value: 7

See Range.types.KX_RadarSensor

Radar sensor: cone pointing along the object +X axis.

Radar sensor: cone pointing along the object +Y axis.

Radar sensor: cone pointing along the object +Z axis.

Radar sensor: cone pointing along the object -X axis.

Radar sensor: cone pointing along the object -Y axis.

See Range.types.KX_RaySensor

Ray sensor: ray cast along the object +X axis.

Ray sensor: ray cast along the object +Y axis.

Ray sensor: ray cast along the object +Z axis.

Ray sensor: ray cast along the object -X axis.

Ray sensor: ray cast along the object -Y axis.

See Range.types.BL_ActionActuator

Action actuator: plays the animation once.

Action actuator: plays forward and, on the next activation, backward.

Action actuator: plays while active and goes back to the start when turned off.

Action actuator: loops while the sensor is active.

Action actuator: loops and, when turned off, finishes the current loop.

See Range.types.BL_ArmatureActuator.type

Just make sure the armature will be updated on the next graphic frame. This is the only persistent mode of the actuator: it executes automatically once per frame until stopped by a controller

Value: 0

Enable the constraint.

Value: 1

Disable the constraint (runtime constraint values are not updated).

Value: 2

Change target and subtarget of constraint.

Value: 3

Change weight of constraint (IK only).

Value: 4

Change influence of constraint.

Value: 5

See Range.types.KX_ConstraintActuator.option

  • Applicable to Distance constraint:

Activate alignment to surface

Activate distance control

Direction of the ray is along the local axis

  • Applicable to Force field constraint:

Force field act on rotation as well

  • Applicable to both:

Detect material rather than property

No deactivation if ray does not hit target

See Range.types.KX_ConstraintActuator.limit

Limit X coord.

Limit Y coord

Limit Z coord

Limit X rotation

Limit Y rotation

Limit Z rotation

Set distance along negative X axis

Set distance along negative Y axis

Set distance along negative Z axis

Set distance along positive X axis

Set distance along positive Y axis

Set distance along positive Z axis

Set orientation of X axis

Set orientation of Y axis

Set orientation of Z axis

Set force field along negative X axis

Set force field along negative Y axis

Set force field along negative Z axis

Set force field along positive X axis

Set force field along positive Y axis

Set force field along positive Z axis

See Range.types.KX_SCA_DynamicActuator

Dynamic actuator: turns physics back on.

Dynamic actuator: turns off the object physics.

Dynamic actuator: turns on rigid body mode (physics rotation).

Dynamic actuator: turns off rigid body mode.

See Range.types.KX_GameActuator

Game actuator: loads another game file.

Game actuator: starts another game file.

Game actuator: restarts the game.

Game actuator: quits the game.

Game actuator: saves the global properties to a file.

Mouse (look) actuator: rotates around the object X axis.

Mouse (look) actuator: rotates around the object Y axis.

Parent actuator: removes the object from its parent.

See Range.types.SCA_RandomActuator

Random actuator: fixed true/false.

Random actuator: true or false, 50% chance each.

Random actuator: true with the chance you set.

Random actuator: fixed integer.

Random actuator: integer picked between a minimum and a maximum.

Random actuator: integer with a Poisson distribution (given mean).

Random actuator: fixed float.

Random actuator: float picked between a minimum and a maximum.

Random actuator: float with a normal distribution (mean and deviation).

See Range.types.KX_SceneActuator

Scene actuator: restarts the scene.

Scene actuator: switches to another scene.

Scene actuator: changes the active camera.

Scene actuator: adds a scene on top (overlay, like a HUD).

Scene actuator: adds a scene behind (background).

Scene actuator: removes a scene.

Scene actuator: pauses a scene.

See Range.types.KX_SoundActuator

Sound actuator: plays while the sensor is active and stops when it turns off.

Value: 1

Sound actuator: plays the whole sound once.

Value: 2

Sound actuator: loops while the sensor is active.

Value: 3

Sound actuator: loops and, when turned off, finishes the current loop.

Value: 4

Sound actuator: plays forward and backward in a loop.

Value: 5

Value: 6

See Range.types.KX_SteeringActuator.behavior

Steering actuator: goes to the target.

Value: 1

Steering actuator: runs away from the target.

Value: 2

Value: 3

See Range.types.KX_TrackToActuator

Track To actuator: the object +X axis points up.

Track To actuator: the object +Y axis points up.

Track To actuator: the object +Z axis points up.

Track To actuator: the object +X axis points at the target.

Track To actuator: the object +Y axis points at the target.

Track To actuator: the object +Z axis points at the target.

Track To actuator: the object -X axis points at the target.

Track To actuator: the object -Y axis points at the target.

2D Filter actuator: blur.

Value: 2

Customer filter, the code code is set via shaderText property.

Value: 12

2D Filter actuator: dilation (brightens edges).

Value: 4

Disable the filter that is currently active

Value: -1

Enable the filter that was previously disabled

Value: -2

2D Filter actuator: erosion (darkens edges).

Value: 5

2D Filter actuator: grayscale.

Value: 9

2D Filter actuator: inverted colors.

Value: 11

2D Filter actuator: edge detection (Laplace).

Value: 6

Create and enable preset filters

Value: 1

Disable and destroy the filter that is currently active

Value: 0

2D Filter actuator: edge detection (Prewitt).

Value: 8

2D Filter actuator: sepia.

Value: 10

2D Filter actuator: sharpen.

Value: 3

Value: 7

Value: 14

See Range.types.BL_ArmatureChannel.rotation_mode

.. note: euler mode are named as in Blender UI but the actual axis order is reversed

Use quaternion in rotation attribute to update bone rotation.

Value: 0

Use euler_rotation and apply angles on bone’s Z, Y, X axis successively.

Value: 1

Use euler_rotation and apply angles on bone’s Y, Z, X axis successively.

Value: 2

Use euler_rotation and apply angles on bone’s Z, X, Y axis successively.

Value: 3

Use euler_rotation and apply angles on bone’s X, Z, Y axis successively.

Value: 4

Use euler_rotation and apply angles on bone’s Y, X, Z axis successively.

Value: 5

Use euler_rotation and apply angles on bone’s X, Y, Z axis successively.

Value: 6

See Range.types.BL_ArmatureConstraint.type

Bone constraint type: Track To (points at a target).

Bone constraint type: IK (inverse kinematics).

Bone constraint type: Copy Rotation.

Bone constraint type: Copy Location.

Bone constraint type: Floor (min/max limit).

Bone constraint type: Copy Scale.

Bone constraint type: Locked Track.

Bone constraint type: Stretch To.

Bone constraint type: Clamp To (sticks to a curve).

Bone constraint type: Transformation.

See Range.types.BL_ArmatureConstraint.ik_type

constraint is trying to match the position and eventually the rotation of the target.

Value: 0

Constraint is maintaining a certain distance to target subject to ik_mode

Value: 1

See Range.types.BL_ArmatureConstraint.ik_flag

Set when the constraint operates on the head of the bone and not the tail

Value: 1

Set when the constraint tries to match the orientation of the target

Value: 2

Set when the armature is allowed to stretch (only the bones with stretch factor > 0.0)

Value: 16

Set when the constraint tries to match the position of the target.

Value: 32

See Range.types.BL_ArmatureConstraint.ik_mode

The constraint tries to keep the bone within ik_dist of target

Value: 0

The constraint tries to keep the bone outside ik_dist of the target

Value: 1

The constraint tries to keep the bone exactly at ik_dist of the target.

Value: 2

Material blend factor: destination alpha. Used in setBlending().

Material blend factor: destination color. Used in setBlending().

Material blend factor: one (full color). Used in setBlending().

Material blend factor: one minus destination alpha. Used in setBlending().

Material blend factor: one minus destination color. Used in setBlending().

Material blend factor: one minus source alpha. Used in setBlending().

Material blend factor: one minus source color. Used in setBlending().

Material blend factor: source alpha. Used in setBlending().

Material blend factor: saturated source alpha. Used in setBlending().

Material blend factor: source color. Used in setBlending().

See Range.types.SCA_PythonKeyboard, Range.types.SCA_PythonMouse, Range.types.SCA_MouseSensor, Range.types.SCA_KeyboardSensor

Key/button state: released.

Key/button state: just pressed.

Key/button state: held down.

See Range.types.KX_GameObject.playAction

Play the action once.

Value: 0

Loop the action (repeat it).

Value: 1

Play the action one direct then back the other way when it has completed.

Value: 2

Blend layers using linear interpolation

Value: 0

Adds the layers together

Value: 1

See Range.types.SCA_MouseSensor

Left mouse button (for the mouse sensor).

Middle mouse button (for the mouse sensor).

Draw only the walls.

Draw only polygons.

Draw triangle mesh.

Shader uniform with the view (world → camera) matrix. Used in setUniformDef().

Shader uniform with the view (world → camera) matrix, inverse. Used in setUniformDef().

Shader uniform with the view (world → camera) matrix, inverse transposed. Used in setUniformDef().

Shader uniform with the view (world → camera) matrix, transposed. Used in setUniformDef().

Shader uniform with the model (object → world) matrix. Used in setUniformDef().

Shader uniform with the model (object → world) matrix, inverse. Used in setUniformDef().

Shader uniform with the model (object → world) matrix, inverse transposed. Used in setUniformDef().

Shader uniform with the model (object → world) matrix, transposed. Used in setUniformDef().

Shader uniform with the model × view matrix. Used in setUniformDef().

Shader uniform with the model × view matrix, inverse. Used in setUniformDef().

Shader uniform with the model × view matrix, inverse transposed. Used in setUniformDef().

Shader uniform with the model × view matrix, transposed. Used in setUniformDef().

Current camera position

Shader uniform with the game time, for animated effects.

User a timer for the uniform value.

See Range.types.KX_StateActuator

Mask for logic brick state 1.

Mask for logic brick state 2.

Mask for logic brick state 3.

Mask for logic brick state 4.

Mask for logic brick state 5.

Mask for logic brick state 6.

Mask for logic brick state 7.

Mask for logic brick state 8.

Mask for logic brick state 9.

Mask for logic brick state 10.

Mask for logic brick state 11.

Mask for logic brick state 12.

Mask for logic brick state 13.

Mask for logic brick state 14.

Mask for logic brick state 15.

Mask for logic brick state 16.

Mask for logic brick state 17.

Mask for logic brick state 18.

Mask for logic brick state 19.

Mask for logic brick state 20.

Mask for logic brick state 21.

Mask for logic brick state 22.

Mask for logic brick state 23.

Mask for logic brick state 24.

Mask for logic brick state 25.

Mask for logic brick state 26.

Mask for logic brick state 27.

Mask for logic brick state 28.

Mask for logic brick state 29.

See Range.types.KX_StateActuator.operation

Substract bits to state mask

Value: 0

Copy state mask

Value: 1

Invert bits to state mask

Value: 2

Add bits to state mask

Value: 3

These items exist in the engine but were not in the Range documentation. The ones marked new in Anastacio were added by Anastacio Engine.

function

Time in seconds since the previous frame. Multiply movement by it so it doesn’t depend on FPS.

Returns: float

new in Anastacio function

Exported game only: frees geometry used only by scene objects left out by the Convert option. They can no longer be converted. Returns the bytes freed.

Returns: int

function

Animation update rate (times per second).

Returns: float

function

Graphics card name.

Returns: str

function

Graphics card vendor.

Returns: str

new in Anastacio function

Report of the latest scene loads: dicts with scene, stage, ms, detail and total. With clear=True, clears it after reading.

Returns: list

new in Anastacio function

Messages (subject, body) that a Message sensor of object to receives this frame.

Returns: list

new in Anastacio function

Value of the object Convert option in the scene.

Returns: bool

function

Processor name.

Returns: str

function

.range files in the current game folder (or in path).

Returns: list

function

.rasec files in the current game folder (or in path).

Returns: list

function

Render rate (times per second).

Returns: float

new in Anastacio function

Converts a scene ahead of time, at the end of this frame (shaders and textures included), without adding it. A later addScene or replaceScene of it only inserts the ready scene, without stalling. Call it while a loading screen is showing. Returns False if the scene doesn’t exist.

Returns: bool

function

Changes the animation update rate.

function

How many times per frame the parent hierarchy is updated (going from 3 to 1 saves CPU).

setObjectConvert(scene, object, convert, children=True)

Section titled “setObjectConvert(scene, object, convert, children=True)”

new in Anastacio function

Changes the Convert option of an object in a scene not loaded yet. Returns how many objects changed.

Returns: int

function

Changes the render rate.

constant

Game actuator mode: takes a screenshot.

constant

Gamepad A button.

constant

Gamepad B button.

constant

Gamepad Back/Select button.

constant

Gamepad Guide (center) button.

constant

Gamepad left shoulder button (LB).

constant

Gamepad left stick click.

constant

Gamepad D-pad down.

constant

Gamepad D-pad left.

constant

Gamepad D-pad right.

constant

Gamepad D-pad up.

constant

Gamepad right shoulder button (RB).

constant

Gamepad right stick click.

constant

Gamepad X button.

constant

Gamepad Y button.

constant

Mouse button 6.

constant

Mouse button 7.

constant

Left side mouse button (thumb).

constant

Right side mouse button (thumb).

constant

Movement sensor: watches all axes.

constant

Movement sensor: -X axis.

constant

Movement sensor: -Y axis.

constant

Movement sensor: -Z axis.

constant

Movement sensor: +X axis.

constant

Movement sensor: +Y axis.

constant

Movement sensor: +Z axis.

constant

2D filter: Bloom.

constant

2D filter: FXAA.

constant

2D filter: light scattering (light rays).

constant

2D filter: outline.

constant

2D filter: ambient occlusion (SSAO).

constant

2D filter: screen-space reflections (SSR).

constant

2D filter: tonemap.