Save Data Problem

Get help using Construct 2

Post » Tue Sep 11, 2012 5:12 pm

Item Persistence .capx

This is an example .capx I was working on to show how item persistence works using dictionary and webstorage.

You click on a square to destroy it. Then you press 1 to save, refresh the page, then press 2 to load (squares you clicked previously should be destroyed again.)

However, I can't get it to work. When loading, either all of the squares are destroyed, or none of them are destroyed.

What am I doing wrong here? I have 3 different methods of loading the save data and destroying the previously clicked squares, but none of them work!
Tokinsom2012-09-11 17:12:51
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Sep 11, 2012 6:06 pm

Add a 'System: For each Sprite' to event 4 so it checks each sprite individually. At the moment it just checks for the first sprites ID in the dictionary and then destroys them all.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Sep 11, 2012 6:27 pm

Aha! I tried that before but the "For Each: Sprite" condition came last which caused all sprites to be destroyed. Guess I'll always put that first from now on.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, BipolarMike, totoe and 21 guests