Possible to save the "state" of a scene?
guru-at-zidware
Member Posts: 369
hi...working on this drawing game and would like to save the actors put down. So if you goto the next scene and come back....all the stuff you did is still there? Is this possible? John
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Some people used this feature to create things like "shops" in games, where you could leave the play area, purchase upgrades for your weapons, and then return to where you left off. It was also used as a pause mechanism - you could click a pause button, go to a "pause" Scene while preserving the previous one, then click a resume button to go back to where you were.
quantumsheep used both features in his games, which is why he is very sad that they deprecated it!
Hopefully at some point they will be able to add back in a similar feature.
Anyway...
As far as your situation goes, because it is not an action game, it is easily doable!
I would achieve it like this:
Create your Scene to be twice as wide as the screen.
On the left side would be the drawing canvas, and on the right side would be the tool palette for example.
You would have a button at the bottom of the canvas side that says "go to tools" or something, and on the tools side, have a button that says "back to canvas".
Scene Instances have access to the Camera. In the Rules for those buttons, simply change the Camera.Origin.X to either 0 or 480, whichever is appropriate.
However, if you were attempting to create sort of a "sketchbook" app, with many different pages, all live, all the time, you will definitely run into RAM issues. All those spawned paint daubs add up.
Saving your creation after you quit the app and being able to recreate it after relaunching it is going to a different matter altogether. I do not think that is possible with GameSalad. ANYTHING is possible, but saving a million X and Y coordinates is a nightmare!
http://gamesalad.com/game/play/67610
Specifically "pan right" should help you.
Perhaps with 'He PAUSED just a little too long' underneath
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io