
Name
- Returns the name of the logic brick.
- string

Sample Code

################ get the name of a sensor
# import bge module
import bge
# get the controller
cont = bge.logic.getCurrentController()
# get a list of the attached sensor
senList = cont.sensors
# get 1st sensor in list
sen_1 = senList[0]
# get name of the sensor
name = sen_1.name