problems with instances variables, while changing layouts

Get help using Construct 2

Post » Fri Dec 04, 2015 5:31 am

Message: RhettBlood is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hello, I am making a mining game where you destroy blocks (dirt, iron, etc) to get the minerals. Every block has an instance variable that acts like health for the blocks, and slows down the destruction. When time runs out the player goes to a new layout, the shop layout. When returning to the main layout, every block is back in place. I'm wondering how to keep the blocks destroyed every time you return. Thank you.
B
12
S
3
Posts: 30
Reputation: 842

Post » Fri Dec 04, 2015 7:43 am

You have to use the Persist behaviour to remember the state it used to be in.

https://www.scirra.com/manual/161/persist
B
14
S
5
G
1
Posts: 32
Reputation: 1,038

Post » Fri Dec 04, 2015 1:07 pm

wow, I wasn't expecting it to be that simple. Thanks a lot, you saved me another headache.
B
12
S
3
Posts: 30
Reputation: 842


Return to How do I....?

Who is online

Users browsing this forum: SantasProject and 9 guests