animation on the same object

how can i animate a door that opens when you click it with the left mouse and close with the left mouse if possible how can i do it in code right now i have it to were it opens and it uses logic bricks

If you kept with the logic bricks it would be as simple as setting a property say “doorOpen” to value 0 that is an int.

For when you click on the door to open it attach a property sensor logic brick that checks that the value of “doorOpen” = 0. Then attach a property actuator that sets the value of “doorOpen” to value 1.

For closing the door do the same thing except property sensor checks for value = 1, and the property actuator changes the value back to 0. Also for the action actuator, you can just put the start frame = to the last frame of the animation and the last frame = the the first frame, this will play the animation backwards.

I hope this helps, but it would be a good Idea to learn python, its much more flexible.

Othello Option:

Properes Sensor Checks for True
—> or
------> Action Actiator Flipper mode

I completly forgot about flipper mode:)

yea i didnt think about flipper mode ither thanks

yea i just had to use ping pong flipper didn’t work