I am working on a combination lock which requires you to click the tumblers to make them rotate. This is my code.
import bge
cont = bge.logic.getCurrentController()
own = cont.owner
rotate = cont.actuators["rotate"]
frames = -19
framee = 0
rotate.frameStart = frames
rotate.frameEnd = framee
def main():
print ("working")
cont.activate(rotate)
It is hooked up like this:
Tumbler object: Message ---- python ---- action
Clickable invisible object: Mouse over and left button ---- and ---- message
It prints “working” but does not activate the actuator.
Please help me.