
frequency
- gets/sets the delay between repeated pulses.
- integer
Range:
- 0 to 10,000
- 0 = no delay

Sample Code

################ get the delay between pulses
# import bge module
import bge
# get the controller
cont = bge.logic.getCurrentController()
# get the sensor attached to the controller
# my sensor is named Sensor_1
sen = cont.sensors["Sensor_1"]
# get delay between pulses
pulseFreq = sen.frequency
Sample Code

################ set the delay between pulses
# import bge module
import bge
# get the controller
cont = bge.logic.getCurrentController()
# get the sensor attached to the controller
# my sensor is named Sensor_1
sen = cont.sensors["Sensor_1"]
# set delay between pulses
sen.frequency = 3