1
$\begingroup$

So when I was going to make a little game, I wanted the game's name, then created by Cool Guy (that's me!) underneath it, so I created a text box and tried to write in it, but it would not work. How do I write in the text box?

$\endgroup$
1
  • $\begingroup$ What do you mean "I created a text box"? How did you try to write on it, and why didn't it work? Please edit your question and provide more information $\endgroup$ Commented Jul 29, 2016 at 18:41

1 Answer 1

1
$\begingroup$

If it is a text object, you can Tab into edit mode and change the text value ahead of time. If you want to edit it realtime in you game please see the following steps:

Step 1

Switch your screen layout to "Game Logic" or open a Logic Editor window.

enter image description here

Now add the text object and position it where you want it.

Step 2

Under the logic properties for the Text object, click the special button that says "Add Text Game Property". A new string property called "Text" will appear, but alas! you cannot edit it directly. You need some game logic. Add a normal game property, set it to boolean, and give it a name you will remember. Now create a new Keyboard sensor, enable "All Keys" mode, and under the log toggle field, select your boolean property. Lastly, under the target field, select your property "Text".

enter image description here

Step 3

Profit. You now have a system where you can dynamically change a text objects lettering in game, but it will only happen when you enable the boolean property. i.e. if in a first person shooter, you could set it to toggle when keypress[right enter key] so you don get long string of "WWWASASAAWWWWWWWWWDD".

Hope this works for you. Happy blending.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .