The code works from top to bottom, if the animation is closed - it makes it open. That works fine.
The problem arises when you have another condition underneath it checking if it’s open. Your code checks if the door is closed, makes it open but it also sees that it is open and makes it closed.
What I usually do in these situations is make a boolean variable and when the E key is pressed, set it to true before the sub-events happen.
After the animation changed to open, change the boolean to false.
When you check if the door is open, add a condition to check if the boolean is true. This way it won’t just close immediately after opening.
Still doesn’t work closing. I think the conflict is exactly the same as it was before and everything should be done in one query. It’s just that I have never done it before, so I can’t figure out how to do it all in one query.
You’re running into the same issue. The actions of the first event are such that all the conditions will be met in the second event, so that then gets actioned too, and the animation never appears to change.
Try this instead. It uses a trigger once on the key press player-door collision and a boolean variable to track whether the door animation has been changed in this set of events: