Can anyone think of a way to have a virtual "sticker page"?
Hi guys,
I'm stuck and could use some help. I am working on a kids game and I would like to have a virtual sticker page that acts as a reward system. The idea is if you do well in a game you earn stickers. A button pops up you tap it and it takes you to a page with a bunch of virtual stickers at the bottom that can be scrolled through. Problem is that when you leave the sticker scene and come back to the game the stickers are gone.
I don't think there is a good way to save the X,Y positions and sticker images in game attributes without writeable tables. I have tried to use the pause unpause behaviors so that when you leave the sticker page you are pausing the game at that point and then while the sticker page is paused you play the games. But it seems that GameSalad dumps the paused info when you are paused and then change to another scene (other than the sticker scene). When I try to unpause at that point it doesn't work.
Any ideas or do I need to scrap this entire idea?
I'm stuck and could use some help. I am working on a kids game and I would like to have a virtual sticker page that acts as a reward system. The idea is if you do well in a game you earn stickers. A button pops up you tap it and it takes you to a page with a bunch of virtual stickers at the bottom that can be scrolled through. Problem is that when you leave the sticker scene and come back to the game the stickers are gone.
I don't think there is a good way to save the X,Y positions and sticker images in game attributes without writeable tables. I have tried to use the pause unpause behaviors so that when you leave the sticker page you are pausing the game at that point and then while the sticker page is paused you play the games. But it seems that GameSalad dumps the paused info when you are paused and then change to another scene (other than the sticker scene). When I try to unpause at that point it doesn't work.
Any ideas or do I need to scrap this entire idea?
Best Answer
-
MarkOnTheIron Posts: 1,447
Oh, right I didn't thought of the saving part. I never tried to save self.attributes. The problem is that locked instances will try to save the attribute to the same key.
Maybe if you gave each instance a unique ID number and use it during the save process? Something like: Save attribute self.X to instanceX..self.ID
I never tried something like this. I don't even know if it's possible to use expressions for saving attributes. But if you can't wait for writable tables to arrive you could try it.
Answers
Or you could wait a little and use writable tables
Ace
@MarkOnTheIron - Can you save and load self attributes for locked instances?
Nice work!
I love this community!
@tshirtbooth - Doesn't seem too messy, but maybe I'm missing something. Would writeable tables allow me to spawn endless amounts of stickers and save their positions and images?