> Don't be afraid that your game idea will not work. Your idea is entirely possible
> For starters, try something like:
> If PLU.text = InputTextBox.Text - > shoot PLU
I've tried this and I think I am slowly figuring it out. So if I made multiple enemies, would I make a separate text object for each specific enemy, or would I keep adding them to the initial Text Object?
Also, how can I remove the text written in the text box after the correct code has been inputted? I tried messing around with it through an System then Event, but I could not figure it out.
Each Enemy would have their own TextObject. There are a few ways to do this. Here are two:
1. Link an Enemy to their TextObject using instance variables and UIDS
UIDs are like social security numbers for objects. They're automatically given out to objects when the game runs, and they don't change during gameplay. You can use them to get specific objects with "Pick By UID"
You would do something like:
On Enemy Created -> Create TextObject -> Set Enemy.TextBoxUID to TextBox.UID
This creates a textbox, then sets a variable within the Enemy object to hold the TextBox's UID, so the textbox can be referenced later
Search for "RTS Template" in the Construct 3 start page for an example of this
2. The second option is to link an Enemy to their TextObject using the new Scene Graph feature. (Heirarchies)
Search for "scene" in the start page and take a look at the examples
To remove the text written, use TextObject > Set Text