def main(): cont = bge.logic.getCurrentController() own = cont.owner scene = bge.logic.getCurrentScene() ring = scene.objects["sel_ring"] newPos = own.position sens = cont.sensors['Mouse'] if sens.positive: aaa = "asdf" ring.position = newPos print(own.name) else: aaa = "asdf" main()
This script runs when object a or object b is mouse clicked.
print(own.name) will print BOTH objects names to the console.
Both objects have a sensor called “Mouse”.
Question: Does that mean every sensor for every object that calls this script… is the owner? I was thinking the owner would be the object… of the sensor… that currently called the script.
Basically, I dont know how to know which object is being clicked… Hmmm.