Upgrade player?

Get help using Construct 2

Post » Sun Aug 02, 2015 3:01 am

Okay so I've never used upgrades in a game before and for this game it involves a player hitting an object to gain points. As well as the points there are also gems to collect.
These gems can then be used to upgrade the player. Now for upgrading the player it isn't increasing the performance etc, just changing the appearance.

Lets pretend I want to change the player from red to green.....The problem I am having is that when I am on a different layout to the game, if I have on clicked on object change player green, when I go back to the game layout It obviously changes the player back to red as it resets the layout. how can I stop this from happening. I also need it to be WebStorage so that the player doesn't revert back to red once the game is closed and re-opened?

Thank you!
B
3
Posts: 36
Reputation: 253

Post » Sun Aug 02, 2015 8:37 am

You could use a global variable to store the info and save it to local storage..

Then on start of any layout you check if the item exists and set the global variable to it's value and set the player to the global variable..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Aug 02, 2015 12:13 pm

Thanks I'll have a go at that now :D
B
3
Posts: 36
Reputation: 253


Return to How do I....?

Who is online

Users browsing this forum: Anonnymitet, Yahoo [Bot] and 5 guests