Hey, so I’ve created a door swing animation and would like to be able to create the interaction where if I click on the door it automatically swings to the open position, if I click it again, it automatically closes. Is this possible and would that be a part of the game engine or should I look somewhere else?
Any help or direction you can give me would be greatly appreciated!
Thanks!
- Right place.2) This is an easy enough example. What I would do is have a boolean property called ‘open’ and then the following logic:
Property=False, Mouseclick -> Property True, open animation
And then again with the property being true, closing the door, and setting the property to false.
Perhaps I should clarify I am completely unfamiliar with the game engine…and programming for that matter. I’m assuming I select Boolean in the properties section of the Logic Editor. Then do I add a property sensor? Not exactly sure what your code means…
Okay, great thanks for the screen shot, now I understand what you were trying to tell me. But I am still totally lost with this game engine thing. Just watched a tutorial about game engine. A guy created a character with animation, then created logic for the armature and then hit P in the 3D view and used the specified sensor to start the animation. I tried the same thing and it doesn’t work. I put in the logic you gave me and it doesn’t do anything. Am I supposed to apply that logic to the armature? And in the tutorial he changed the parenting of the mesh to Armature instead of Object, but the mesh I have is parented to specific bones, not the whole armature. I am so confused. Is there another tutorial you might point me to?