Hi, using the addActiveActuator i can start the movement of an object but can’t find how to stop it after 3 seconds, i don’t want the object to dissapear, just stop it where it was when time finished
GameLogic.addActiveActuator(act, 0) should stop it
Don’t know why doesn’t stop it,
it executes the line GL.addActiveActuator(rotate,0)
it prints in the console “before” and “after” but doesn’t stop the Actuator
import GameLogic as GL import Rasterizer as R R.showMouse(1) cont3 = GL.getCurrentController() own = cont3.getOwner() leftclick = cont3.getSensor("leftclick") mouseover = cont3.getSensor("mouseover") rotate = cont3.getActuator("rotate") if leftclick.isPositive() and mouseover.isPositive(): GL.addActiveActuator(rotate,1) three = ['a','b','c'] for x in three: print x if (x == 'c'): print"before" GL.addActiveActuator(rotate,0) print"after"
You have to remember your dealing with a physics engine. So, if you remove a force, depending on how the dampen is set, etc, it will keep spinning. Something I do is set up a very simple situation, like a cube spinning, and play around with it until I get a good understanding. Then I take that knowledge and put it in my main program.
I’m just taking a wild guess from your other posts, but maybe you want the “track to” option of the edit object actuator instead.