Problem with load and save [It's not a bug]

Discussion and feedback on Construct 2

Post » Mon Apr 03, 2017 1:28 pm

Hi, can anyone help me with this ?.

In my game I use "save game" in certain areas of the map.
Then, when the player loses a life or continues the game the next day, then use "load" and allows to continue playing in a certain area.

The problem is that I do not know how to discount a life to the player since if I discount a life, then when I use "load" to continue in the last point saved, the lives are restored to that point and I get nothing.

Perhaps this helps the explanation:

You enter a new area of the game and you have 5 lives at that time.
The game is saved.
Later in that area you lose a life.
You discount that life and now you have 4 lives.
I charge the game to continue on the last saved item but then the lives are reset to 5 again!.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Mon Apr 03, 2017 1:54 pm

"Later in that area you lose a life.
You discount that life and now you have 4 lives."

everytime you die, you need to make a save :D and the when, level is loaded it loads the last number of life saved.

everytime you load the level you need add the function load the last datas for life, gold, magic etc at "start of layout".
Last edited by imothep85 on Mon Apr 03, 2017 2:11 pm, edited 1 time in total.
B
37
S
15
G
7
Posts: 1,681
Reputation: 9,614

Post » Mon Apr 03, 2017 2:00 pm

imothep85 wrote:"Later in that area you lose a life.
You discount that life and now you have 4 lives."

everytime you die, you need to make a save :D and the when then, level is loaded it loads the last number of life saved.

everytime you load the level you need add the function load the last datas for life, gold, magic etc


Do you mean to save the number of lives in a separate file at the time of death and then load it when a game is loaded ?.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Mon Apr 03, 2017 2:05 pm

yes, :D but you load that only for the current level
B
37
S
15
G
7
Posts: 1,681
Reputation: 9,614

Post » Mon Apr 03, 2017 2:11 pm

imothep85 wrote:yes, :D but you load that only for the current level


Okay, I understand, thanks, I'll try that.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453


Return to Construct 2 General

Who is online

Users browsing this forum: bounty, jook00 and 17 guests