subject
subject
Note:
setting the message subject
the sensor listens for doesn't work.
For now, use
setSubjectFilterText(subject)
gets/sets the message subject the sensor is listening for.
Type: string
Sample
Code
################### Get subject
# get controller
controller = GameLogic.getCurrentController()
# get message sensor attached to the controller named
message
messSensor = controller.sensors["message"]
# get the subject sensor is listening for
subject = messSensor.subject
################### Set subject
# get controller
controller = GameLogic.getCurrentController()
# get message sensor attached to the controller named
message
messSensor = controller.sensors["message"]
# set the subject sensor is listening for
messSensor.subject = "Death"
|