mode
mode
gets/sets Property Actuator mode
Type: integer
1 = Assign
2 = Add
3 = Copy
4 = Toggle (bool/integer/float/timer)
Sample
Code
################ Get mode
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator named act attached to the controller
act = controller.actuators["act"]
# get mode
prop = act.mode
################ Set mode
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator named act attached to the controller
act = controller.actuators["act"]
# set mode
act.mode = 2
|