BGE python api addition, GameObject get/setState and Controller.getState()

Also added a note in the tooltip for action priority when using more then 1 action at a time.
This commit is contained in:
2008-06-29 21:52:23 +00:00
parent ab7794392e
commit 6a3e8e7fff
7 changed files with 70 additions and 1 deletions

View File

@@ -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
"""