How to display Text from 2 different Scenes
SanoRock
Member Posts: 13
Hi,
I wanted to know how to get text to display from one scene to another.
Here's what I'm trying to do.
They're going to press a button that will change the scene to give them options.
The options will be Number 1, Number 2 and Number 3
When they click on any of those buttons
I would like the scene to change back to the previous scene
and show up in a display text box with either Number 1, Number 2 or Number 3 showing
Best Answer
-
jamie_c ImagineLabs.rocks Posts: 5,772
I'm not talking about using the Save and Load behaviors, just store the text in an attribute.
First create a game level text attribute called Choice (or whatever).
Then in the button do:
When touch is pressed Change Attribute Choice to "your text"
Then in the other scene you can display the "your text" with a Display Text behavior, like:
Display Text Choice
See the sample attached.
Answers
You can either store the text value in an Attribute or in a Table and then recall it from those as needed throughout the game.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I've tried to save them as and attribute but can't figure out how to load them
Thank you that was exactly what I needed. I was using the save attribute instead of the change attribute.
Glad it worked for you.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page