-
Text in a Game
I'm trying to make it so that in my game you can insert text into an edit box so that when "enter" is pressed the text goes to a string object and the text is deleted from the edit box((this is for the dog game I'm making for my friend) so the computer tells you the dog is hungry and you type in "food" and the dog's food bowl fills up). Can anyone think of how I can do this?
-
Re: Text in a Game
Create an edit box and a string object.
Press enter
- Set string to contents of edit box
- Set contents of edit box to ""
String object = "food"
+One action when event loops
- Fill up dog bowl
Is that what you're after? I'm not really sure.
-
Re: Text in a Game
That worked, thanks a lot.
-
Re: Text in a Game
If you don't need the string to actually be displayed, you can completely skip the part where it sends it to the string, and just see if the edit box = "food".