Or Controller: useHighPriority

useHighPriority
  • gets/sets whether or not the controller executes before all other controllers that don't have useHighPriority enabled.

Type: 
  • boolean

Values:

  • 1 = True = useHighPriority enabled
  • 0 = False = useHighPriority disabled
Or Controller:
  • A python controller is needed to run the python script used to access any actuators connected to a Controller
Sample Code


################  get the status of high priority

# import bge module
import bge

# get the python controller
# Note: My Python controller and Or controller are attached to same game object

python_controller = bge.logic.getCurrentController()

# get the game object that owns the controller
obj = python_controller.owner

# get the Or Controller attached to the game object
# my Or Controller is named Or_1
or_controller = obj.controllers["Or_1"]

# get the status of high priority
status = or_controller.useHighPriority
 
Sample Code


################  set the status of high priority

# import bge module
import bge

# get the python controller
# Note: My Python controller and Or controller are attached to same game object

python_controller = bge.logic.getCurrentController()

# get the game object that owns the controller
obj = python_controller.owner

# get the Or Controller attached to the game object
# my Or Controller is named Or_1
or_controller = obj.controllers["Or_1"]

# enable high priority
or_controller.useHighPriority = True