I have a blender scene with a few objects, I would get the object name when mouse is over one of them, setting a property of an empy object.
What I have now is just the list of the scene objects. What can I do?
import GameLogic
cont=GameLogic.getCurrentController()
obj=cont.getOwner()
print obj
objlist=GameLogic.getCurrentScene().getObjectList()
print objlist
sen=cont.getSensor('sensor')
if sen.isPositive():
print objlist[0]
PropName=.... #how to set this with the object name?
print PropName
In order to be useful to someone else, I answer my own question. What I’ve done was to set a
mouse oversensor to each objects within the scene and that add a python script controller, in order to set a property of the sceneEmpty object.