Hey, i’m trying to make an text-input based game where the player can control the character, so for example if player enters in input:
move(1) then it will move him by 16 pixels, however i want it to be able to read multiple lines, example:
which will move him by 64 pixels. or:
which will continously move him
You can use the array tools extension. It has an action called Split string into an array. You can then use for each child variable to go through the array and compare the text. You might need to use text manipulation expressions to find values within the lines.
Here are the events using a button object, text input and text object
(if the button is pressed, it clears the text object, splits the input text to array list and then goes through the list and add it to the text object.
Thank you so much! You really helped me out