repeat
repeat
gets/sets the state of the Repeat (REP) toggle button.
Type: integer
1
= repeat the cycle (delay/duration) over and over.
0
= run cycle once. Don't repeat.
Sample
Code
################# Get repeat
# get the controller
controller = GameLogic.getCurrentController()
# get the delay sensor attached to the controller named
sensor
sen = controller.sensors["sensor"]
# repeat the delay/duration cycle?
cycle = sen.repeat
################# Set repeat
# get the controller
controller = GameLogic.getCurrentController()
# get the delay sensor attached to the controller named
sensor
sen = controller.sensors["sensor"]
# set it to repeat
sen.repeat = 1
|