How do I keep track health bar value to the next layout

Get help using Construct 2

Post » Sat Aug 15, 2015 11:21 am

Hi guys .. I'm having problem with my health bar.
As soon as my character goes to the next layout, the hp resets to full ..
How do I make the hp value carry on to the next layout?

I.E : Layout 1 : 50/50 -> hit by mob -> 40/50 -> Goes to layout 2 : 40/50 instead of resetting the health to 50/50

Note : I dont use global variables ... just setting it it to "every tick" and I use "add variables" for my health bar :(
B
5
S
1
Posts: 14
Reputation: 409

Post » Sat Aug 15, 2015 12:12 pm

This is a case where you SHOULD use global variables. I can't understand how you have it set up from your description, but you should have a global for "health" that you manipulate based on your game. Then, you can display something on screen to represent it based on the variable.
B
103
S
38
G
19
Posts: 962
Reputation: 17,986

Post » Sat Aug 15, 2015 12:23 pm

C-7 wrote:This is a case where you SHOULD use global variables. I can't understand how you have it set up from your description, but you should have a global for "health" that you manipulate based on your game. Then, you can display something on screen to represent it based on the variable.


gotcha ;D thank you ..
B
5
S
1
Posts: 14
Reputation: 409


Return to How do I....?

Who is online

Users browsing this forum: davidbox, Mayfly and 6 guests