How do I keep the score rolling between levels

Get help using Construct 2

Post » Sun Mar 15, 2015 8:43 am

I'm creating a game for PC/Wii U where you are constantly underwater collecting treasure ,and fighting off sea creatures called "Super Booty Diver"...little bit of a tongue in cheek kind of name lol

Anyhow im to the point of switching levels (layouts). I want to be able to keep the score rolling when going from level 1 to level 2 ,and so on. Yet it keeps resetting once i change levels. So how do you keep it rolling between levels?

I only want the score to reset if you die.

Any help would be great

Thank You
Grab That Booty!

Booty Diver is available on Steam, Itch.io, Xbox One, and Nintendo Wii U for $4.99.

Checkout the trailer
https://www.youtube.com/watch?v=tWhklyjL9vQ
B
13
S
2
Posts: 15
Reputation: 712

Post » Sun Mar 15, 2015 10:38 am

Are you storing your score in a global variable?
To store score "permanently", use WebStorage.
Image
B
17
S
7
Posts: 126
Reputation: 1,955

Post » Sun Mar 15, 2015 3:51 pm

I have a global variable of Score= 0 then i have on Every Tick >Set Text- "Score: "&Score then i have On Start of Layout> Reset Global Variables to Default because i have a timer running, treasure chest count, and ammo count all displayed in the HUD along with the Score.
Grab That Booty!

Booty Diver is available on Steam, Itch.io, Xbox One, and Nintendo Wii U for $4.99.

Checkout the trailer
https://www.youtube.com/watch?v=tWhklyjL9vQ
B
13
S
2
Posts: 15
Reputation: 712

Post » Mon Mar 16, 2015 4:04 am

maybe reset those individually instead of reseting every single global variable?
B
5
S
1
Posts: 59
Reputation: 497

Post » Mon Mar 16, 2015 6:04 am

Thanks ChefSeth i can't believe i overlooked something so simple...i was so use to making it work the otherway.
Grab That Booty!

Booty Diver is available on Steam, Itch.io, Xbox One, and Nintendo Wii U for $4.99.

Checkout the trailer
https://www.youtube.com/watch?v=tWhklyjL9vQ
B
13
S
2
Posts: 15
Reputation: 712


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests