Module SCA_PropertySensor :: Class SCA_PropertySensor
[hide private]
[frames] | no frames]

Class SCA_PropertySensor

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
            SCA_ISensor.SCA_ISensor --+
                                      |
                                     SCA_PropertySensor

Activates when the game object property matches.

Instance Methods [hide private]
 
getType()
Gets when to activate this sensor.
source code
 
setType(checktype)
Set the type of check to perform.
source code
string
getProperty()
Return the property with which the sensor operates.
source code
 
setProperty(name)
Sets the property with which to operate.
source code
string
getValue()
Return the value with which the sensor compares to the value of the property.
source code
 
setValue(value)
Set the value with which the sensor operates.
source code

Inherited from SCA_ISensor.SCA_ISensor: getFrequency, getInvert, getLevel, getUseNegPulseMode, getUsePosPulseMode, isPositive, isTriggered, reset, setFrequency, setInvert, setLevel, setUseNegPulseMode, setUsePosPulseMode

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details [hide private]

getType()

source code 

Gets when to activate this sensor.

Returns:
KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL, KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED, or KX_PROPSENSOR_EXPRESSION.

setType(checktype)

source code 

Set the type of check to perform.

Parameters:
  • checktype (KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL, KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED, or KX_PROPSENSOR_EXPRESSION.)

getProperty()

source code 

Return the property with which the sensor operates.

Returns: string
the name of the property this sensor is watching.

setProperty(name)

source code 

Sets the property with which to operate. If there is no property of that name, this call is ignored.

Parameters:
  • name (string.)

getValue()

source code 

Return the value with which the sensor compares to the value of the property.

Returns: string
the value of the property this sensor is watching.

setValue(value)

source code 

Set the value with which the sensor operates. If the value is not compatible with the type of the property, the subsequent action is ignored.

Parameters:
  • value (string)