(I searched for similar questions but didn't find anything that would be too similar, but if you know any pointers, please link them.)
I have a Player and a Door scene (the game is 2D) .What I want to do, is when the Player collides with the Door (this part is ok) and the player presses a button, the Door should play an animation. I tried with
- The Door.gd detects the button press and collision and plays the animation. The problem here is that the player has to do a ton of other stuff to hide inside (think Outlast), so that's a lot of code.
- The player detects button press and makes the Door play the animation. This is working, but only by
Which is... yeah, ugly and Godot is smarter than this.
Now the question is, assume I want to keep Player and Door in separate scenes and want to reuse them in different levels (with always more than 1 door on a level). Is there a way to send a generic signal to another scene, or is there a better way of doing this?
Big scene (level) structure is
-> //misc nodes