Hi to all !
It seems there is something about familiy variables.
Layout 1 holds a family full of sprites and this family has variables to it.
I need to display these variables in layout 2 but it seems that variable value don't pass from a layout to the next.
Do you have any explantion / solution for this ?
Develop games in your browser. Powerful, performant & highly capable.
the family variables are just a way to input the same variable into a bunch of instances without having to do it one by one. it also lets you manage those instances as a groups when needed. https://www.scirra.com/manual/142/families
however, as with all instances, their existence starts and ends with the layout. the only way to have permanent variables is by using Global Variables https://www.scirra.com/manual/83/variables
You could, however, store the instance variable, for later use, in a number of ways: You could use arrays, dictionaries, webstorage or global variables with numbers or even in JSON format to move the data from one layout into the next. (https://www.scirra.com/manual/108/array, https://www.scirra.com/manual/140/dictionary, https://www.scirra.com/manual/140/dictionary)
take your time to review the manual entries =)
Thanks — That's a pretty neat answer to my problem.
I managed to solve my problem in a different way but your suggestions will help me for the rest of my work