I’ve got a very simple scene where the text typed on the keyboard gets applied to a text-object.
When return is pressed this script runs:
import bge
cont=bge.logic.getCurrentController()
own=cont.owner
if(own['Text']=="quit"):
bge.logic.endGame()
else:
own['Text']=""
It checks if the input text equals “quit” and if so quits the game.
This also works if I run it directly in blender, but however when I try this with the stanalone player,
it won’t do anything but setting the “Text”-property back to an empty string.
If I add print(own[‘Text’]) it also prints the right text in the console.
It gets even weirder when I try to print something like: own[‘Text’] + “abc”
Running in blender it prints this:quitabc
in the standalone player this:abct
abc
Does anybody know why it does this??