How do I not reset player health on second level

Get help using Construct 2

Post » Thu Nov 06, 2014 4:29 pm

Hi Guys,

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!
B
8
S
1
Posts: 90
Reputation: 644

Post » Thu Nov 06, 2014 4:35 pm

Try to add Global variable instead of instance variable. ;)
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Thu Nov 06, 2014 4:45 pm

Message: BinaryPanda can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
assign it to a global variable to carry it over?

more than 1 use a global array maybe?

found this: https://www.scirra.com/tutorials/264/re ... -variables
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Thu Nov 06, 2014 4:46 pm

Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Thu Nov 06, 2014 4:58 pm

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. :)
B
8
S
1
Posts: 90
Reputation: 644


Return to How do I....?

Who is online

Users browsing this forum: Christmas, irina, minigame and 6 guests