Hello I’m trying to get my python script to capture the mouse click. When I run the game and click the button, in the console I end up with “Nothing”. It should be “MouseClick”. Can someone please point out what I’m doing wrong?
Of course I forgot to post the code, sorry about that lol
controller = GameLogic.getCurrentController()
owner = controller.getOwner()
print (owner)
gender = 0
mouseclick = controller.getSensor("mouseclick")
mouseover = controller.getSensor("mouseover")
if mouseclick.isPositive() == "true":
print ("MouseClick")
elif mouseover.isPositive() == "true":
print ("MouseOver")
else:
print ("Nothing")