How do I stop the health bar from resetting in each layer?

Get help using Construct 2

Post » Mon Apr 04, 2016 5:57 am

Message: Thorne can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I basically added a health bar using this tutorial here: https://www.youtube.com/watch?v=DFUrc6eNsIg

It uses an instance variable but it resets each time the player goes into a new layer. How do I make it continual?
B
4
S
1
Posts: 11
Reputation: 316

Post » Mon Apr 04, 2016 2:53 pm

Make it global.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Apr 04, 2016 6:17 pm

Or try to add the persist behavior maybe?
B
13
S
4
G
1
Posts: 31
Reputation: 1,439

Post » Mon Apr 04, 2016 8:07 pm

gumshoe2029 wrote:Make it global.


Sorry how do I do that?
B
4
S
1
Posts: 11
Reputation: 316

Post » Mon Apr 04, 2016 8:07 pm

aaronreed wrote:Or try to add the persist behavior maybe?


How do I add the persist variable to the instance vairable?
B
4
S
1
Posts: 11
Reputation: 316

Post » Tue Apr 05, 2016 2:08 am

He means that whatever the object that has that variable is, in the "Properties" section you want to go to Object type properties (very top of the properties panel) and there is an option there for Global. Set it to yes. Left side of screen is the properties panel by default.
B
28
S
5
G
5
Posts: 98
Reputation: 4,804

Post » Sat Apr 09, 2016 12:30 am

Thorne wrote:
gumshoe2029 wrote:Make it global.


Sorry how do I do that?


There should be a property that says, Global: yes or no.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Lancifer, LunaticCat, WesleyDeveloper9 and 7 guests