
status
- Returns the status of the sensor
- integer
Values:
- 0 = KX_SENSOR_INACTIVE = sensor inactive
- 1 = KX_SENSOR_JUST_ACTIVATED = sensor just activated
- 2 = KX_SENSOR_ACTIVE = sensor active
- 3 = KX_SENSOR_JUST_DEACTIVATED = sensor just deactivated

Sample Code

################ get the status of the sensor
# import bge module
import bge
# get the controller
cont = bge.logic.getCurrentController()
# get the sensor named Sensor_1
sen = cont.sensors["Sensor_1"]
# get the status of the sensor
status = sen.status