Remember values of instance variables

2

Index

Stats

8,049 visits, 16,740 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 16 Feb, 2012. Last updated 19 Feb, 2019

Hi, in this tutorial I'll show you how you can save values of instance variables and then load the saved values without any special saving-plugin. I will use global variables ("Text") to store the values. If you want to save many different instance-variables: Perhaps the Plugin Sprite Bank will do a good job for you.

At first have a look at the examples below:

First example: Type some text in. After hitting the “next Layout” Button you will see a second Layout – you can write some text in the TextBox again. The Button on the second Layout brings you back to the first Layout and you will see your typed text ;)

(Page 2,3 in the tutorial)

Second example: Similar to the first example but for many instances of the TextBox-object. (Page 4,5 in the tutorial)

Third example: Drag the sprites around – the positions of the sprites will be remembered.

You can download all examples at the last page of this tutorial.

All suggestions are welcome and have fun, Joe7 ;)

  • 3 Comments

  • Order by
Want to leave a comment? Login or Register an account!