Save Slots?

Get help using Construct 2

Post » Sun May 26, 2013 10:01 pm

[QUOTE=InvaderX] @Joannesalfa Let's say I wanted to delete my save file. How would I do that? Also, how do I distinguish the slots that have saves from the ones that dont? That way if I press the button "New Game" the ones with saves on them are set invisible.

EDIT: Also, for some reason, webstorage isn't saving the SaveStateJSON?[/QUOTE]

1- Ask @Ashley, he never replied about delete save file yet.

2- WebStorage is not SaveStateJSON
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Sun May 26, 2013 10:06 pm

@Joannesalfa
1. Okay
2. I mean like, whatever Webstorage was supposed to save, it isn't saving.
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Sun May 26, 2013 10:17 pm

If is not saving, you probably made it wrong
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Sun May 26, 2013 11:30 pm

@Joannesalfa This is what I have:
Did I do it wrong?
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Sun May 26, 2013 11:38 pm

@InvaderX

I can't help, but do indexedDB storage (used for the save-states) isn't Really Huge?, and so used instead of WebStorage because of that? (so, I'm not sure to store it entierly in the webstorage is a good thing to do).

EDIT: Also, I'm guessing you already save to a Save Slot by doing the system Save action, so, It is just nonsense, again, I can be wrong

EDIT2: you can load, not from JSON, but just load, and enter the name of the slot you selected before, don't use webstorage actions At all.Aphrodite2013-05-26 23:46:23
https://www.scirra.com/forum/viewtopic.php?t=152506

And that is why you shall respect the bug reports guidelines, not only giving a capx is making the bug reproductible in one click in a situation they can work with (less time wasted trying to reproduce vague instructions) but also it helps filtering false positives.

Game design is all about decomposing the core of your game so it becomes simple instructions.
B
42
S
17
G
16
Posts: 2,090
Reputation: 15,347

Post » Mon May 27, 2013 3:46 am

[QUOTE=Aphrodite]
EDIT: Also, I'm guessing you already save to a Save Slot by doing the system Save action, so, It is just nonsense, again, I can be wrong

EDIT2: you can load, not from JSON, but just load, and enter the name of the slot you selected before, don't use webstorage actions At all.[/QUOTE]

Yep, that's the way I do it. No need for webstorage imo.

Actions:

System - Save game to slot "Slot1"

System - Load game from slot "Slot1"

Deleting games tho? Sorry, no clue. But saving to the same slot overwrites the old, don't know if that's any help.
B
22
S
6
G
1
Posts: 398
Reputation: 3,384

Post » Tue May 28, 2013 3:00 am

@ErekT Okay, I have everything working now. I used Webstorage to save a local key that says if the slot has a save or not. If it does, if the slot is opened, load the game. Also, you can delete the local value, and it's like deleting the world, because it says the slot has no game in it. Cool stuff :)
B
29
S
7
G
3
Posts: 361
Reputation: 6,187

Post » Tue Aug 13, 2013 5:35 am

[QUOTE=Joannesalfa] @InvaderX Use expression to get Text.box to store value.[/QUOTE]

I feel like I should be able to follow this, but I'm not. My game will begin with three buttons representing empty save slots - they say "New Character"

When the player selects, I want him to name his character (and the corresponding save slot).

I can't figure out how to carry that name back to the first layout.

In the example you posted, can you show me how to rename the Layout 1 buttons from Layout 2?Padraik2013-08-13 05:38:00
B
14
Posts: 20
Reputation: 945

Post » Tue Aug 13, 2013 5:41 pm

And, of course, I answered my own question. When the player enters the desired name of the save slot, I save it to a global variable (One of three variables since I have 3 save slots, which I give the initial value of "New Character") - then, on form load, I simply added

button -> set text -> GlobalSaveSlotName

for all three save slot buttons. Thanks for the saving demo, Joannesalfa.
B
14
Posts: 20
Reputation: 945

Post » Tue Aug 13, 2013 7:07 pm

Well - I thought I was done.

the problem I'm having now is that when the game starts, all buttons say "New Character" because no save data has been loaded that has the correct names stored in the slots. Clicking the slots loads the correct game, but how do I have those slots populated for a player to choose his game before a save slot is chosen?

Image1 of my Capx save events

Image2 of my Capx save eventsPadraik2013-08-13 19:11:21
B
14
Posts: 20
Reputation: 945

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests