diff options
Diffstat (limited to 'source/gameengine/PyDoc/SCA_PythonController.py')
-rw-r--r-- | source/gameengine/PyDoc/SCA_PythonController.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/gameengine/PyDoc/SCA_PythonController.py b/source/gameengine/PyDoc/SCA_PythonController.py index eb9e57c0819..6d91736d636 100644 --- a/source/gameengine/PyDoc/SCA_PythonController.py +++ b/source/gameengine/PyDoc/SCA_PythonController.py @@ -46,4 +46,12 @@ class SCA_PythonController(SCA_IController): @type script: string. """ + def getState(): + """ + Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active. + This for instance will always be true however you could compare with a previous state to see when the state was activated. + GameLogic.getCurrentController().getState() & GameLogic.getCurrentController().getOwner().getState() + + @rtype: int + """ |