0 votes

Hi, I want to make a quick menu that's accessible during gameplay and can be enabled while holding a key, so the player can select an item with the arrows. Then on release, the item gets selected.

A little gif showing the intended result:

selectable items menu

Now, I've tried with ItemList, and with an HBoxContainer with buttons and adding focus logic, but it lead to unintended results.

I'm completely lost in what should I do, if someone can point me in the right direction, it'd be really appreciated.

in Engine by (12 points)

If I get you rigth the player should push a certain key and a menu will show? like

var Item : String = ""
if Input.is_key_pressed(KEY_0):
if $PathToNode.visible:
  if Input.is_key_pressed(KEY_LEFT):
     Item = "Item01"
    Item = "No Item"

Like this?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.