I have an instance variable on my main platform player with initial value of 100. When I complete level 1 (layout 1) and go to level 2 (layout 2) the player's health resets to 100. How would I have the value at the end of layout 1 carry over into layout 2? Thanks for your help!
Try to add Global variable instead of instance variable.
Develop games in your browser. Powerful, performant & highly capable.
assign it to a global variable to carry it over?
more than 1 use a global array maybe?
found this: scirra.com/tutorials/264/re ... -variables
https://www.scirra.com/tutorials/264/re ... -variables
Great, thank you. The tutorial I used to make my health meter had me create it using an instance variable for the main character, that is why I went that way with it. I will give this a shot tonight. Thanks smarties.