BGE Help, Open a door with a key press

Hello, i’m kinda new to blender and python, so i want some help with a problem. I don’t know how to open a door with a key press if you are close to it, Plz help;)

Hello
Logic Bricks solution ( there’s different ways to do it):

Add an “open” animation to your door ( In the Dope Sheet/Action Editor)!
When done, select you door object, then add some Logic:
Keyboard Sensor - Whatever key -> AND Controller -> Action Actuator - TheNameOfTheOpenAction - Number of Frames - Flipper motio ( to open and close with same animation)
Bye

Also you would want to combine that with near sensor, for example, or the door will open no matter of the distance to it

Extention to OTO’s solution (as the door would close when releasing the key):

Property: “requestOpen”:Boolean:False
KeyboardSensor [no pulses] --> AND --> Property Mode: Toggle Property:“requestOpen”
PropertySensor [no pulses] --> AND --> ActionActuator Mode:Flipper