

repeat
- repeat the cycle (delay/duration) over and over.
- integer
Values:
- 1 = True = repeat the cycle (delay/duration) over and over.
- 0 = False = run cycle once. Don't repeat.
Delay Sensor:
- The Delay Sensor delays sending a pulse to the controller.

Sample Code

################ Get repeat
# import bge module
import bge
# get the controller
cont = bge.logic.getCurrentController()
# get the sensor attached to the controller
# my sensor is named Recharge
sen = cont.sensors["Recharge"]
# delay/duration cycle being repeated?
cycle = sen.repeat
Sample Code

################ Set repeat
# import bge module
import bge
# get the controller
cont = bge.logic.getCurrentController()
# get the sensor attached to the controller
# my sensor is named Recharge
sen = cont.sensors["Recharge"]
# set delay/duration cycle to be repeated
sen.repeat = True