List of items that player can reference during game play

How do I create a list of items, where each item has a number and the list itself is not visible on the screen. On the game screen I have an input textbox and an output textbox. I want player to be able to type a number in the input textbook and whatever item that matches that particular number is displayed in the output textbox. I tried using an array and pulling up the children by their child number but couldn’t get it to display it in the output textbox, and I couldn’t find the “Item” extension (just added that info so you’d know I searched the forum topics before asking, because I know this is an easy one, I’m just missing something.). Thank you

Yes you are missing something, normally using “Array” can get this job done,
Can I see the event where you display the output based on index number of your array?

You may also need to test where and when your event fails
maybe instead of typing you make it just press a key 1 2 3 then item 1 2 or 3 will appear if it does then the event that makes it happens is fine, if it does appear with wrong item then something wrong with your array or the way you referring to that object / missing animation, or even it doesn’t appear at all so you will know more where supposed to be wrong.

You could use an array but then you’d have to convert the text ToNumber() and make sure it’s within the range of >=0 and <= the number of children.

A structure might be easier. Set it up similar to the array. Use the number as the name and the text as the value. I added the letter N before each name because Arrays use numbers list[1] for their children or indexes while structures use text. list[“1”] while “1” inside quotes is technically text or a string, it’s best to start the child name with a letter or word without spaces. It makes it more obvious that it’s a structure and not an array and it’s less likely to cause issues.

And then you can check if the child exists. This uses a button. You can invert the child exists condition to handle invalid numbers. You can also set the input box “type” to number.

Variables in GD can be tricky. You need to check that the array or structure exist before trying to get the value otherwise the variable gets created.

Adding text before the child name seems less clean but believe me it will make things clearer and prevent debugging headaches just be sure to use the same case either upper or lower.

I went on a bit because I don’t know how familair you are with variables plus the extra detail can help other users. Variables can be a tricky subject for new (and old) users.

I see, the red underline is from invalid syntax, If you want to access your array use syntax like
ArrayName[Index]
Where ArrayName is any of your arrays
[Index] is integer number

In this case it would be planes[Input.Text::Value()] ← Make sure you type the correct name, and remember the first item in your array is at index 0 so if you called planes[1] it would be your 2nd item in the array list.

And as @Keith_1357 said you may need to convert the text value into number first because it has " " marks in the value

Full steps:

  1. Create a scene array & set values

  2. Have this condition check if the number input is not exceed the array bound

  3. Looks like this set the text to match what input index number