delay
delay
gets/sets the number of frames the sensor waits before using a positive
pulse to trigger the sensor.
Type: integer
Sample
Code
################### Get delay
# get the controller
controller = GameLogic.getCurrentController()
# get the delay sensor attached to the controller named
sensor
sen = controller.sensors["sensor"]
# get the delay
delay = sen.delay
################### Set delay
# get the controller
controller = GameLogic.getCurrentController()
# get the delay sensor attached to the controller named
sensor
sen = controller.sensors["sensor"]
# set the delay
sen.delay = 3
|