In my game, players have to guess something, and whenever they guess correctly, a barrier is removed off of said thing. I have tried looking through all of the nodes, but I cannot find anything. I have the input field down. I just don’t know how to put it where whenever specific things are typed, the barrier is removed.
Try On Input Field End Edit
or On Input Field Value Changed
event nodes. You should also tag the topic with Visual-Scripting tag if you’re talking about Unity Visual Scripting, which I think you are.
Okay, so I probably should have specified this. I am incredibly new to VS. And unity in general. I don’t learn well by watching videos and reading information. I learn by doing it and asking others and listening to them tell me. Due to my lack of knowledge, I have no idea what nodes to attach to the End edit or Value changed ones xD
According to docs those two should be green event nodes, which likely need a reference to Input Field component. The easiest way is just to put the graph with those events on the same GameObject that has the Input Field component.
They should also do what they say. On Input Field End Edit
should trigger when you finish editing the input field, probably by hitting enter after writing something in it. On Input Field Value Changed
should trigger whenever a new character is entered in the Input Field.
You’d use one of them as a start to your logic. After that you need to get the text of input field, then check against valid inputs. You can hold valid inputs in a List<string>
variable. And then use the List Contains
node to determine if current input field text is present in the valid inputs list and if it is then continue to barrier removal logic using If
branch node.
If all of this sounds like nonsense you need to start from the very beginning with some Unity Visual Scripting tutorials. You can find them on Unity Learn: Learn game development w/ Unity | Courses & tutorials in game design, VR, AR, & Real-time 3D | Unity Learn
And Youtube: