20621fae65937dd751d004104c892aecd39faf29
[blender.git] / source / gameengine / PyDoc / GameLogic.py
1 # $Id$
2 """
3 Documentation for the GameLogic Module.
4
5 Constants
6 =========
7         - KX_TRUE:  True value used by some modules
8         - KX_FALSE: False value used by some modules.
9
10 Property Sensor
11 ---------------
12         Tests that the property sensor is able to perform.
13                 - KX_PROPSENSOR_EQUAL:          Activate when the property is equal to the sensor value.
14                 - KX_PROPSENSOR_NOTEQUAL                Activate when the property is not equal to the sensor value.
15                 - KX_PROPSENSOR_INTERVAL                Activate when the property is between the specified limits.
16                 - KX_PROPSENSOR_CHANGED         Activate when the property changes
17                 - KX_PROPSENSOR_EXPRESSION      Activate when the expression matches
18
19 Constraint Actuator
20 -------------------
21         The axis and type (location/rotation) of constraint
22                 - KX_CONSTRAINTACT_LOCX
23                 - KX_CONSTRAINTACT_LOCY
24                 - KX_CONSTRAINTACT_LOCZ
25                 - KX_CONSTRAINTACT_ROTX
26                 - KX_CONSTRAINTACT_ROTY
27                 - KX_CONSTRAINTACT_ROTZ
28
29 IPO Actuator
30 ------------
31         IPO Types
32                 - KX_IPOACT_PLAY
33                 - KX_IPOACT_PINGPONG
34                 - KX_IPOACT_FLIPPER
35                 - KX_IPOACT_LOOPSTOP
36                 - KX_IPOACT_LOOPEND
37
38 Random Distributions
39 --------------------
40         - KX_RANDOMACT_BOOL_CONST
41         - KX_RANDOMACT_BOOL_UNIFORM
42         - KX_RANDOMACT_BOOL_BERNOUILLI
43         - KX_RANDOMACT_INT_CONST
44         - KX_RANDOMACT_INT_UNIFORM
45         - KX_RANDOMACT_INT_POISSON
46         - KX_RANDOMACT_FLOAT_CONST
47         - KX_RANDOMACT_FLOAT_UNIFORM
48         - KX_RANDOMACT_FLOAT_NORMAL
49         - KX_RANDOMACT_FLOAT_NEGATIVE_EXPONENTIAL
50
51 """
52
53
54 def getCurrentController():
55         """
56         Gets the Python controller associated with this Python script.
57         
58         @rtype: SCA_PythonController
59         """
60 def addActiveActuator(actuator, activate):
61         """
62         Activates the given actuator.
63         
64         @type actuator: SCA_IActuator
65         @type activate: boolean
66         @param activate: whether to activate or deactivate the given actuator.
67         """
68 def getRandomFloat():
69         """
70         Returns a random floating point value in the range [0...1)
71         """
72 def setGravity(gravity):
73         """
74         Sets the world gravity.
75         
76         @type gravity: list [fx, fy, fz]
77         """
78 def getSpectrum():
79         """
80         Returns a 512 point list from the sound card.
81         This only works if the fmod sound driver is being used.
82         
83         @rtype: list [float], len(getSpectrum()) == 512
84         """
85 def stopDSP():
86         """
87         Stops the sound driver using DSP effects.
88         
89         Only the fmod sound driver supports this.
90         DSP can be computationally expensive.
91         """