Godot Version
v4.4.stable.official [4c311cbee]
Question
Hi all, I have been reading (and re-reading) Input because I am trying to implement a mini-game in my game similar to the terminal/strategem input in Helldivers 2.
Essentially, I want to process input once a player interacts with an object in game, and then handle all controller input for this mini-game. I am going to show icons on screen and have the user input controller actions. However, I don’t want the player to move, shoot, etc. While doing this. I want to temporarily have the player input focus over on the mini-game.
Okay, that is the summary. If you are interested in my thought process, here is my reasoning so far:
- At first I thought, okay, perhaps I detect when a player has approached the terminal, show a control node, give it focus, and handle the inputs there. But I am using _input and on both the terminal and player nodes. Both were handled.
- Then I thought, well, maybe I have a signal call to the player to change some kind of enum or bool, and I stop handling input in the player script altogether. But this would mean I need to handle state anytime I pause the game, create antother mini-game, etc. The structure of Godot input seems to act like a net, where things are handled and stop processing down the chain, so it felt like swimming against the design current. At least for as I understand it, I could be wrong.
This led me to believe I should just ask. I have read the docs and searched for examples but am left unsure about what direction to take. FWIW, this is the closest thing to what I am looking for: _gui_input vs _unhandled_input for key presses - #6
Thank you!