9 Module to access logic functions, imported automatically into the python controllers namespace.
13 .. code-block:: python
15 # To get the controller thats running this python script:
16 cont = bge.logic.getCurrentController() # bge.logic is automatically imported
18 # To get the game object this controller is on:
21 :class:`~bge.types.KX_GameObject` and :class:`~bge.types.KX_Camera` or :class:`~bge.types.KX_LightObject` methods are available depending on the type of object
23 .. code-block:: python
25 # To get a sensor linked to this controller.
26 # "sensorname" is the name of the sensor as defined in the Blender interface.
27 # +---------------------+ +--------+
28 # | Sensor "sensorname" +--+ Python +
29 # +---------------------+ +--------+
30 sens = cont.sensors["sensorname"]
32 # To get a sequence of all sensors:
35 See the sensor's reference for available methods:
40 * :class:`~bge.types.KX_MouseFocusSensor`
41 * :class:`~bge.types.KX_NearSensor`
42 * :class:`~bge.types.KX_NetworkMessageSensor`
43 * :class:`~bge.types.KX_RadarSensor`
44 * :class:`~bge.types.KX_RaySensor`
45 * :class:`~bge.types.KX_TouchSensor`
46 * :class:`~bge.types.SCA_DelaySensor`
47 * :class:`~bge.types.SCA_JoystickSensor`
48 * :class:`~bge.types.SCA_KeyboardSensor`
49 * :class:`~bge.types.SCA_MouseSensor`
50 * :class:`~bge.types.SCA_PropertySensor`
51 * :class:`~bge.types.SCA_RandomSensor`
53 You can also access actuators linked to the controller
55 .. code-block:: python
57 # To get an actuator attached to the controller:
58 # +--------+ +-------------------------+
59 # + Python +--+ Actuator "actuatorname" |
60 # +--------+ +-------------------------+
61 actuator = co.actuators["actuatorname"]
63 # Activate an actuator
64 controller.activate(actuator)
66 See the actuator's reference for available methods
71 * :class:`~bge.types.BL_ActionActuator`
72 * :class:`~bge.types.KX_CameraActuator`
73 * :class:`~bge.types.KX_ConstraintActuator`
74 * :class:`~bge.types.KX_GameActuator`
75 * :class:`~bge.types.KX_NetworkMessageActuator`
76 * :class:`~bge.types.KX_ObjectActuator`
77 * :class:`~bge.types.KX_ParentActuator`
78 * :class:`~bge.types.KX_SCA_AddObjectActuator`
79 * :class:`~bge.types.KX_SCA_DynamicActuator`
80 * :class:`~bge.types.KX_SCA_EndObjectActuator`
81 * :class:`~bge.types.KX_SCA_ReplaceMeshActuator`
82 * :class:`~bge.types.KX_SceneActuator`
83 * :class:`~bge.types.KX_SoundActuator`
84 * :class:`~bge.types.KX_StateActuator`
85 * :class:`~bge.types.KX_TrackToActuator`
86 * :class:`~bge.types.KX_VisibilityActuator`
87 * :class:`~bge.types.SCA_2DFilterActuator`
88 * :class:`~bge.types.SCA_PropertyActuator`
89 * :class:`~bge.types.SCA_RandomActuator`
91 Most logic brick's methods are accessors for the properties available in the logic buttons.
92 Consult the logic bricks documentation for more information on how each logic brick works.
94 There are also methods to access the current :class:`bge.types.KX_Scene`
96 .. code-block:: python
98 # Get the current scene
99 scene = bge.logic.getCurrentScene()
101 # Get the current camera
102 cam = scene.active_camera
104 Matricies as used by the game engine are **row major**
105 ``matrix[row][col] = float``
107 :class:`bge.types.KX_Camera` has some examples using matrices.
115 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.
116 It can also be written to a file and loaded later on with the game load/save actuators.
118 .. note:: only python built in types such as int/string/bool/float/tuples/lists can be saved, GameObjects, Actuators etc will not work as expected.
122 The current keyboard wrapped in an :class:`~bge.types.SCA_PythonKeyboard` object.
126 The current mouse wrapped in an :class:`~bge.types.SCA_PythonMouse` object.
132 .. function:: getCurrentController()
134 Gets the Python controller associated with this Python script.
136 :rtype: :class:`bge.types.SCA_PythonController`
138 .. function:: getCurrentScene()
140 Gets the current Scene.
142 :rtype: :class:`bge.types.KX_Scene`
144 .. function:: getSceneList()
146 Gets a list of the current scenes loaded in the game engine.
148 :rtype: list of :class:`bge.types.KX_Scene`
150 .. note:: Scenes in your blend file that have not been converted wont be in this list. This list will only contain scenes such as overlays scenes.
152 .. function:: loadGlobalDict()
154 Loads bge.logic.globalDict from a file.
156 .. function:: saveGlobalDict()
158 Saves bge.logic.globalDict to a file.
160 .. function:: startGame(blend)
162 Loads the blend file.
164 :arg blend: The name of the blend file
167 .. function:: endGame()
169 Ends the current game.
171 .. function:: restartGame()
173 Restarts the current game by reloading the .blend file (the last saved version, not what is currently running).
175 .. function:: LibLoad(blend, type, data, load_actions=False, verbose=False, load_scripts=True)
177 Converts the all of the datablocks of the given type from the given blend.
179 :arg blend: The path to the blend file (or the name to use for the library if data is supplied)
181 :arg type: The datablock type (currently only "Action", "Mesh" and "Scene" are supported)
183 :arg data: Binary data from a blend file (optional)
185 :arg load_actions: Search for and load all actions in a given Scene and not just the "active" actions (Scene type only)
186 :type load_actions: bool
187 :arg verbose: Whether or not to print debugging information (e.g., "SceneName: Scene")
189 :arg load_scripts: Whether or not to load text datablocks as well (can be disabled for some extra security)
190 :type load_scripts: bool
192 .. function:: LibNew(name, type, data)
194 Uses existing datablock data and loads in as a new library.
196 :arg name: A unique library name used for removal later
198 :arg type: The datablock type (currently only "Mesh" is supported)
200 :arg data: A list of names of the datablocks to load
201 :type data: list of strings
203 .. function:: LibFree(name)
205 Frees a library, removing all objects and meshes from the currently active scenes.
207 :arg name: The name of the library to free (the name used in LibNew)
210 .. function:: LibList()
212 Returns a list of currently loaded libraries.
216 .. function:: addScene(name, overlay=1)
218 Loads a scene into the game engine.
222 This function is not effective immediately, the scene is queued
223 and added on the next logic cycle where it will be available
226 :arg name: The name of the scene
228 :arg overlay: Overlay or underlay (optional)
229 :type overlay: integer
231 .. function:: sendMessage(subject, body="", to="", message_from="")
233 Sends a message to sensors in any active scene.
235 :arg subject: The subject of the message
236 :type subject: string
237 :arg body: The body of the message (optional)
239 :arg to: The name of the object to send the message to (optional)
241 :arg message_from: The name of the object that the message is coming from (optional)
242 :type message_from: string
244 .. function:: setGravity(gravity)
246 Sets the world gravity.
248 :type gravity: list [fx, fy, fz]
250 .. function:: getSpectrum()
252 Returns a 512 point list from the sound card.
253 This only works if the fmod sound driver is being used.
255 :rtype: list [float], len(getSpectrum()) == 512
257 .. function:: getMaxLogicFrame()
259 Gets the maximum number of logic frames per render frame.
261 :return: The maximum number of logic frames per render frame
264 .. function:: setMaxLogicFrame(maxlogic)
266 Sets the maximum number of logic frames that are executed per render frame.
267 This does not affect the physic system that still runs at full frame rate.
269 :arg maxlogic: The new maximum number of logic frames per render frame. Valid values: 1..5
270 :type maxlogic: integer
272 .. function:: getMaxPhysicsFrame()
274 Gets the maximum number of physics frames per render frame.
276 :return: The maximum number of physics frames per render frame
279 .. function:: setMaxPhysicsFrame(maxphysics)
281 Sets the maximum number of physics timestep that are executed per render frame.
282 Higher value allows physics to keep up with realtime even if graphics slows down the game.
283 Physics timestep is fixed and equal to 1/tickrate (see setLogicTicRate)
284 maxphysics/ticrate is the maximum delay of the renderer that physics can compensate.
286 :arg maxphysics: The new maximum number of physics timestep per render frame. Valid values: 1..5.
287 :type maxphysics: integer
289 .. function:: getLogicTicRate()
291 Gets the logic update frequency.
293 :return: The logic frequency in Hz
296 .. function:: setLogicTicRate(ticrate)
298 Sets the logic update frequency.
300 The logic update frequency is the number of times logic bricks are executed every second.
301 The default is 60 Hz.
303 :arg ticrate: The new logic update frequency (in Hz).
306 .. function:: getPhysicsTicRate()
308 Gets the physics update frequency
310 :return: The physics update frequency in Hz
313 .. warning: Not implimented yet
315 .. function:: setPhysicsTicRate(ticrate)
317 Sets the physics update frequency
319 The physics update frequency is the number of times the physics system is executed every second.
320 The default is 60 Hz.
322 :arg ticrate: The new update frequency (in Hz).
325 .. warning: Not implimented yet
327 .. function:: getExitKey()
329 Gets the key used to exit the game engine
331 :return: The key (defaults to :mod:`bge.events.ESCKEY`)
334 .. function:: setExitKey(key)
336 Sets the key used to exit the game engine
338 :arg key: A key constant from :mod:`bge.events`
346 .. function:: expandPath(path)
348 Converts a blender internal path into a proper file system path.
350 Use / as directory separator in path
351 You can use '//' at the start of the string to define a relative path;
352 Blender replaces that string by the directory of the startup .blend or runtime file
353 to make a full path name (doesn't change during the game, even if you load other .blend).
354 The function also converts the directory separator to the local file system format.
356 :arg path: The path string to be converted/expanded.
358 :return: The converted string
361 .. function:: getAverageFrameRate()
363 Gets the estimated/average framerate for all the active scenes, not only the current scene.
365 :return: The estimated average framerate in frames per second
368 .. function:: getBlendFileList(path = "//")
370 Returns a list of blend files in the same directory as the open blend file, or from using the option argument.
372 :arg path: Optional directory argument, will be expanded (like expandPath) into the full path.
374 :return: A list of filenames, with no directory prefix
377 .. function:: getRandomFloat()
379 Returns a random floating point value in the range [0 - 1)
381 .. function:: PrintGLInfo()
383 Prints GL Extension Info into the console
391 True value used by some modules.
395 False value used by some modules.
407 .. data:: KX_SENSOR_INACTIVE
408 .. data:: KX_SENSOR_JUST_ACTIVATED
409 .. data:: KX_SENSOR_ACTIVE
410 .. data:: KX_SENSOR_JUST_DEACTIVATED
416 .. _armaturesensor-type:
418 See :class:`bge.types.KX_ArmatureSensor.type`
420 .. data:: KX_ARMSENSOR_STATE_CHANGED
422 Detect that the constraint is changing state (active/inactive)
426 .. data:: KX_ARMSENSOR_LIN_ERROR_BELOW
428 Detect that the constraint linear error is above a threshold
432 .. data:: KX_ARMSENSOR_LIN_ERROR_ABOVE
434 Detect that the constraint linear error is below a threshold
438 .. data:: KX_ARMSENSOR_ROT_ERROR_BELOW
440 Detect that the constraint rotation error is above a threshold
444 .. data:: KX_ARMSENSOR_ROT_ERROR_ABOVE
446 Detect that the constraint rotation error is below a threshold
451 .. _logic-property-sensor:
457 .. data:: KX_PROPSENSOR_EQUAL
459 Activate when the property is equal to the sensor value.
463 .. data:: KX_PROPSENSOR_NOTEQUAL
465 Activate when the property is not equal to the sensor value.
469 .. data:: KX_PROPSENSOR_INTERVAL
471 Activate when the property is between the specified limits.
475 .. data:: KX_PROPSENSOR_CHANGED
477 Activate when the property changes
481 .. data:: KX_PROPSENSOR_EXPRESSION
483 Activate when the expression matches
491 See :class:`bge.types.KX_RadarSensor`
493 .. data:: KX_RADAR_AXIS_POS_X
494 .. data:: KX_RADAR_AXIS_POS_Y
495 .. data:: KX_RADAR_AXIS_POS_Z
496 .. data:: KX_RADAR_AXIS_NEG_X
497 .. data:: KX_RADAR_AXIS_NEG_Y
498 .. data:: KX_RADAR_AXIS_NEG_Z
504 See :class:`bge.types.KX_RaySensor`
506 .. data:: KX_RAY_AXIS_POS_X
507 .. data:: KX_RAY_AXIS_POS_Y
508 .. data:: KX_RAY_AXIS_POS_Z
509 .. data:: KX_RAY_AXIS_NEG_X
510 .. data:: KX_RAY_AXIS_NEG_Y
511 .. data:: KX_RAY_AXIS_NEG_Z
524 See :class:`bge.types.BL_ActionActuator`
526 .. data:: KX_ACTIONACT_PLAY
527 .. data:: KX_ACTIONACT_PINGPONG
528 .. data:: KX_ACTIONACT_FLIPPER
529 .. data:: KX_ACTIONACT_LOOPSTOP
530 .. data:: KX_ACTIONACT_LOOPEND
531 .. data:: KX_ACTIONACT_PROPERTY
537 .. _armatureactuator-constants-type:
539 See :class:`bge.types.BL_ArmatureActuator.type`
541 .. data:: KX_ACT_ARMATURE_RUN
543 Just make sure the armature will be updated on the next graphic frame.
544 This is the only persistent mode of the actuator:
545 it executes automatically once per frame until stopped by a controller
549 .. data:: KX_ACT_ARMATURE_ENABLE
551 Enable the constraint.
555 .. data:: KX_ACT_ARMATURE_DISABLE
557 Disable the constraint (runtime constraint values are not updated).
561 .. data:: KX_ACT_ARMATURE_SETTARGET
563 Change target and subtarget of constraint.
567 .. data:: KX_ACT_ARMATURE_SETWEIGHT
569 Change weight of constraint (IK only).
573 .. data:: KX_ACT_ARMATURE_SETINFLUENCE
575 Change influence of constraint.
583 .. _constraint-actuator-option:
585 See :class:`bge.types.KX_ConstraintActuator.option`
587 * Applicable to Distance constraint:
589 .. data:: KX_CONSTRAINTACT_NORMAL
591 Activate alignment to surface
593 .. data:: KX_CONSTRAINTACT_DISTANCE
595 Activate distance control
597 .. data:: KX_CONSTRAINTACT_LOCAL
599 Direction of the ray is along the local axis
601 * Applicable to Force field constraint:
603 .. data:: KX_CONSTRAINTACT_DOROTFH
605 Force field act on rotation as well
607 * Applicable to both:
609 .. data:: KX_CONSTRAINTACT_MATERIAL
611 Detect material rather than property
613 .. data:: KX_CONSTRAINTACT_PERMANENT
615 No deactivation if ray does not hit target
617 .. _constraint-actuator-limit:
619 See :class:`bge.types.KX_ConstraintActuator.limit`
621 .. data:: KX_CONSTRAINTACT_LOCX
625 .. data:: KX_CONSTRAINTACT_LOCY
629 .. data:: KX_CONSTRAINTACT_LOCZ
633 .. data:: KX_CONSTRAINTACT_ROTX
637 .. data:: KX_CONSTRAINTACT_ROTY
641 .. data:: KX_CONSTRAINTACT_ROTZ
645 .. data:: KX_CONSTRAINTACT_DIRNX
647 Set distance along negative X axis
649 .. data:: KX_CONSTRAINTACT_DIRNY
651 Set distance along negative Y axis
653 .. data:: KX_CONSTRAINTACT_DIRNZ
655 Set distance along negative Z axis
657 .. data:: KX_CONSTRAINTACT_DIRPX
659 Set distance along positive X axis
661 .. data:: KX_CONSTRAINTACT_DIRPY
663 Set distance along positive Y axis
665 .. data:: KX_CONSTRAINTACT_DIRPZ
667 Set distance along positive Z axis
669 .. data:: KX_CONSTRAINTACT_ORIX
671 Set orientation of X axis
673 .. data:: KX_CONSTRAINTACT_ORIY
675 Set orientation of Y axis
677 .. data:: KX_CONSTRAINTACT_ORIZ
679 Set orientation of Z axis
681 .. data:: KX_CONSTRAINTACT_FHNX
683 Set force field along negative X axis
685 .. data:: KX_CONSTRAINTACT_FHNY
687 Set force field along negative Y axis
689 .. data:: KX_CONSTRAINTACT_FHNZ
691 Set force field along negative Z axis
693 .. data:: KX_CONSTRAINTACT_FHPX
695 Set force field along positive X axis
697 .. data:: KX_CONSTRAINTACT_FHPY
699 Set force field along positive Y axis
701 .. data:: KX_CONSTRAINTACT_FHPZ
703 Set force field along positive Z axis
709 See :class:`bge.types.KX_SCA_DynamicActuator`
711 .. data:: KX_DYN_RESTORE_DYNAMICS
712 .. data:: KX_DYN_DISABLE_DYNAMICS
713 .. data:: KX_DYN_ENABLE_RIGID_BODY
714 .. data:: KX_DYN_DISABLE_RIGID_BODY
715 .. data:: KX_DYN_SET_MASS
723 See :class:`bge.types.KX_GameActuator`
725 .. data:: KX_GAME_LOAD
726 .. data:: KX_GAME_START
727 .. data:: KX_GAME_RESTART
728 .. data:: KX_GAME_QUIT
729 .. data:: KX_GAME_SAVECFG
730 .. data:: KX_GAME_LOADCFG
736 .. data:: KX_PARENT_REMOVE
737 .. data:: KX_PARENT_SET
739 .. _logic-random-distributions:
745 See :class:`bge.types.SCA_RandomActuator`
747 .. data:: KX_RANDOMACT_BOOL_CONST
748 .. data:: KX_RANDOMACT_BOOL_UNIFORM
749 .. data:: KX_RANDOMACT_BOOL_BERNOUILLI
750 .. data:: KX_RANDOMACT_INT_CONST
751 .. data:: KX_RANDOMACT_INT_UNIFORM
752 .. data:: KX_RANDOMACT_INT_POISSON
753 .. data:: KX_RANDOMACT_FLOAT_CONST
754 .. data:: KX_RANDOMACT_FLOAT_UNIFORM
755 .. data:: KX_RANDOMACT_FLOAT_NORMAL
756 .. data:: KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL
762 See :class:`bge.types.KX_SceneActuator`
764 .. data:: KX_SCENE_RESTART
765 .. data:: KX_SCENE_SET_SCENE
766 .. data:: KX_SCENE_SET_CAMERA
767 .. data:: KX_SCENE_ADD_FRONT_SCENE
768 .. data:: KX_SCENE_ADD_BACK_SCENE
769 .. data:: KX_SCENE_REMOVE_SCENE
770 .. data:: KX_SCENE_SUSPEND
771 .. data:: KX_SCENE_RESUME
773 .. _logic-sound-actuator:
779 See :class:`bge.types.KX_SoundActuator`
781 .. data:: KX_SOUNDACT_PLAYSTOP
785 .. data:: KX_SOUNDACT_PLAYEND
789 .. data:: KX_SOUNDACT_LOOPSTOP
793 .. data:: KX_SOUNDACT_LOOPEND
797 .. data:: KX_SOUNDACT_LOOPBIDIRECTIONAL
801 .. data:: KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP
809 .. _logic-steering-actuator:
811 See :class:`bge.types.KX_SteeringActuator.behavior`
813 .. data:: KX_STEERING_SEEK
817 .. data:: KX_STEERING_FLEE
821 .. data:: KX_STEERING_PATHFOLLOWING
834 .. data:: RAS_2DFILTER_BLUR
838 .. data:: RAS_2DFILTER_CUSTOMFILTER
840 Customer filter, the code code is set via shaderText property.
844 .. data:: RAS_2DFILTER_DILATION
848 .. data:: RAS_2DFILTER_DISABLED
850 Disable the filter that is currently active
854 .. data:: RAS_2DFILTER_ENABLED
856 Enable the filter that was previously disabled
860 .. data:: RAS_2DFILTER_EROSION
864 .. data:: RAS_2DFILTER_GRAYSCALE
868 .. data:: RAS_2DFILTER_INVERT
872 .. data:: RAS_2DFILTER_LAPLACIAN
876 .. data:: RAS_2DFILTER_MOTIONBLUR
878 Create and enable preset filters
882 .. data:: RAS_2DFILTER_NOFILTER
884 Disable and destroy the filter that is currently active
888 .. data:: RAS_2DFILTER_PREWITT
892 .. data:: RAS_2DFILTER_SEPIA
896 .. data:: RAS_2DFILTER_SHARPEN
900 .. data:: RAS_2DFILTER_SOBEL
907 .. _armaturechannel-constants-rotation-mode:
909 See :class:`bge.types.BL_ArmatureChannel.rotation_mode`
912 euler mode are named as in Blender UI but the actual axis order is reversed
914 .. data:: ROT_MODE_QUAT
916 Use quaternion in rotation attribute to update bone rotation.
920 .. data:: ROT_MODE_XYZ
922 Use euler_rotation and apply angles on bone's Z, Y, X axis successively.
926 .. data:: ROT_MODE_XZY
928 Use euler_rotation and apply angles on bone's Y, Z, X axis successively.
932 .. data:: ROT_MODE_YXZ
934 Use euler_rotation and apply angles on bone's Z, X, Y axis successively.
938 .. data:: ROT_MODE_YZX
940 Use euler_rotation and apply angles on bone's X, Z, Y axis successively.
944 .. data:: ROT_MODE_ZXY
946 Use euler_rotation and apply angles on bone's Y, X, Z axis successively.
950 .. data:: ROT_MODE_ZYX
952 Use euler_rotation and apply angles on bone's X, Y, Z axis successively.
960 .. _armatureconstraint-constants-type:
962 See :class:`bge.types.BL_ArmatureConstraint.type`
964 .. data:: CONSTRAINT_TYPE_TRACKTO
965 .. data:: CONSTRAINT_TYPE_KINEMATIC
966 .. data:: CONSTRAINT_TYPE_ROTLIKE
967 .. data:: CONSTRAINT_TYPE_LOCLIKE
968 .. data:: CONSTRAINT_TYPE_MINMAX
969 .. data:: CONSTRAINT_TYPE_SIZELIKE
970 .. data:: CONSTRAINT_TYPE_LOCKTRACK
971 .. data:: CONSTRAINT_TYPE_STRETCHTO
972 .. data:: CONSTRAINT_TYPE_CLAMPTO
973 .. data:: CONSTRAINT_TYPE_TRANSFORM
974 .. data:: CONSTRAINT_TYPE_DISTLIMIT
976 .. _armatureconstraint-constants-ik-type:
978 See :class:`bge.types.BL_ArmatureConstraint.ik_type`
980 .. data:: CONSTRAINT_IK_COPYPOSE
982 constraint is trying to match the position and eventually the rotation of the target.
986 .. data:: CONSTRAINT_IK_DISTANCE
988 Constraint is maintaining a certain distance to target subject to ik_mode
992 .. _armatureconstraint-constants-ik-flag:
994 See :class:`bge.types.BL_ArmatureConstraint.ik_flag`
996 .. data:: CONSTRAINT_IK_FLAG_TIP
998 Set when the constraint operates on the head of the bone and not the tail
1002 .. data:: CONSTRAINT_IK_FLAG_ROT
1004 Set when the constraint tries to match the orientation of the target
1008 .. data:: CONSTRAINT_IK_FLAG_STRETCH
1010 Set when the armature is allowed to stretch (only the bones with stretch factor > 0.0)
1014 .. data:: CONSTRAINT_IK_FLAG_POS
1016 Set when the constraint tries to match the position of the target.
1020 .. _armatureconstraint-constants-ik-mode:
1022 See :class:`bge.types.BL_ArmatureConstraint.ik_mode`
1024 .. data:: CONSTRAINT_IK_MODE_INSIDE
1026 The constraint tries to keep the bone within ik_dist of target
1030 .. data:: CONSTRAINT_IK_MODE_OUTSIDE
1032 The constraint tries to keep the bone outside ik_dist of the target
1036 .. data:: CONSTRAINT_IK_MODE_ONSURFACE
1038 The constraint tries to keep the bone exactly at ik_dist of the target.
1048 .. data:: BL_DST_ALPHA
1049 .. data:: BL_DST_COLOR
1051 .. data:: BL_ONE_MINUS_DST_ALPHA
1052 .. data:: BL_ONE_MINUS_DST_COLOR
1053 .. data:: BL_ONE_MINUS_SRC_ALPHA
1054 .. data:: BL_ONE_MINUS_SRC_COLOR
1055 .. data:: BL_SRC_ALPHA
1056 .. data:: BL_SRC_ALPHA_SATURATE
1057 .. data:: BL_SRC_COLOR
1064 See :class:`bge.types.SCA_PythonKeyboard`, :class:`bge.types.SCA_PythonMouse`, :class:`bge.types.SCA_MouseSensor`, :class:`bge.types.SCA_KeyboardSensor`
1066 .. data:: KX_INPUT_NONE
1067 .. data:: KX_INPUT_JUST_ACTIVATED
1068 .. data:: KX_INPUT_ACTIVE
1069 .. data:: KX_INPUT_JUST_RELEASED
1074 .. _gameobject-playaction-mode:
1076 See :class:`bge.types.KX_GameObject.playAction`
1078 .. data:: KX_ACTION_MODE_PLAY
1080 Play the action once.
1084 .. data:: KX_ACTION_MODE_LOOP
1086 Loop the action (repeat it).
1090 .. data:: KX_ACTION_MODE_PING_PONG
1092 Play the action one direct then back the other way when it has completed.
1101 See :class:`bge.types.SCA_MouseSensor`
1103 .. data:: KX_MOUSE_BUT_LEFT
1104 .. data:: KX_MOUSE_BUT_MIDDLE
1105 .. data:: KX_MOUSE_BUT_RIGHT
1108 Navigation Mesh Draw Modes
1111 .. _navmesh-draw-mode:
1115 Draw only the walls.
1129 .. data:: VIEWMATRIX
1130 .. data:: VIEWMATRIX_INVERSE
1131 .. data:: VIEWMATRIX_INVERSETRANSPOSE
1132 .. data:: VIEWMATRIX_TRANSPOSE
1133 .. data:: MODELMATRIX
1134 .. data:: MODELMATRIX_INVERSE
1135 .. data:: MODELMATRIX_INVERSETRANSPOSE
1136 .. data:: MODELMATRIX_TRANSPOSE
1137 .. data:: MODELVIEWMATRIX
1138 .. data:: MODELVIEWMATRIX_INVERSE
1139 .. data:: MODELVIEWMATRIX_INVERSETRANSPOSE
1140 .. data:: MODELVIEWMATRIX_TRANSPOSE
1143 Current camera position
1145 .. data:: CONSTANT_TIMER
1147 User a timer for the uniform value.
1149 .. data:: SHD_TANGENT
1155 See :class:`bge.types.KX_StateActuator`
1166 .. data:: KX_STATE10
1167 .. data:: KX_STATE11
1168 .. data:: KX_STATE12
1169 .. data:: KX_STATE13
1170 .. data:: KX_STATE14
1171 .. data:: KX_STATE15
1172 .. data:: KX_STATE16
1173 .. data:: KX_STATE17
1174 .. data:: KX_STATE18
1175 .. data:: KX_STATE19
1176 .. data:: KX_STATE20
1177 .. data:: KX_STATE21
1178 .. data:: KX_STATE22
1179 .. data:: KX_STATE23
1180 .. data:: KX_STATE24
1181 .. data:: KX_STATE25
1182 .. data:: KX_STATE26
1183 .. data:: KX_STATE27
1184 .. data:: KX_STATE28
1185 .. data:: KX_STATE29
1186 .. data:: KX_STATE30
1188 .. _state-actuator-operation:
1190 See :class:`bge.types.KX_StateActuator.operation`
1192 .. data:: KX_STATE_OP_CLR
1194 Substract bits to state mask
1198 .. data:: KX_STATE_OP_CPY
1204 .. data:: KX_STATE_OP_NEG
1206 Invert bits to state mask
1210 .. data:: KX_STATE_OP_SET
1212 Add bits to state mask
1216 .. _Two-D-FilterActuator-mode: