I need a textbox that detects if you type a specific thing. Basically the same system as a text based adventure game
In the bottom right corner, next to the “Asset Library” there’s a + button that says “Add Builtin Asset” when you hover over it. It’ll take you to the builtin assets, and there you should be able to find a text box. You should be able to use that in your project
Another thing, to get the value of the textbox, you might want to select the textbox itself after adding it to canvas, go to “Edit Timeline,” and name the textbox (not the text on top) to something like “box,” then exit the timeline. This way, you can refer to the value of what’s typed inside the text box as
project.textInput.box.inputElem.value
Quick_Textbox_Example.wick (4.8 KB)
so i can make it be like " if {project.textInput.box.inputElem.value === hello} Answer.setText(hi)" it will work? (Also that not the exact code im gonna put its just a simplified version)
i tried if (project.textInput.box.inputElem.value === hello ) {
gotoAndStop(3)
}
but idk if im doing it right
Don’t forget the quotation marks around “hello” to make it stand out as a string, otherwise the code will think that hello is a variable with an undefined value
if(project.textInput.box.inputElem.value === "hello"){
gotoAndStop(3);
}