Setting event image to previous CanvasSnapshot

Get help using Construct 2

Post » Fri Feb 26, 2016 2:52 am

Message: Landermere can only post plain text URLS until they have 500 rep. 4 URLS modified. Why?
Hello again fellow nerds!
I have made some real progress on my current games project and by jove it's really taking shape!
I am here again to ask for your help!
Todays problem involves the CanvasSnapshot feature.

Scenario

I am creating a save feature that allows the player to to see their progress from the previous save.
Once the game has been saved it creates a CanvasSnapshot and then sets an event to that CanvasSnapshot (see images below)

http://pasteboard.co/1PDNrFm0.png - menu after saving (shows current level state)
http://pasteboard.co/1PDRjygm.png - menu after closing browser and relaunching game (no image)
http://pasteboard.co/1PDUQtfG.png - loading the game after closing browser (Loads the game state correctly but does not show image)

Edit - http://pasteboard.co/1PE9bu93.png - event sheet for save and load.


So my question is: what would be the optimal way to save the CanvasSnapshot and load CanvasSnapshot after the player has closed the browser and re-launches it?
Thanks in advance :)
Chris
B
8
S
1
Posts: 46
Reputation: 544

Post » Sun Feb 28, 2016 2:00 am

Message: Landermere can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Hello again fellow Nerds!
Ok so I feel I may have not explained my goal as clearly as possible first time round.
So here goes for round 2 :)

I would like to create a save menu that takes a snapshot of the games current state and displays this image in an event.
I have achieved this thus far. see image : http://pasteboard.co/1SCJZEhg.png

My issue comes when I try to reload/refresh the game client.
The load file is available but the image is not saved, dispite having the sprite be saved along with most other entities/events etc.
When you load the game up again (or even refresh the browser) the snapshot disappears and so the sprite that shows the snapshot returns to a white sprite. See Image : http://pasteboard.co/1SCYrbQx.png

I have tried a couple of things but don't feel I have gotten anywhere close to the desired function of this.

I am looking for a way to use the snapshot, created when saving, as a way to show the player they have saved even after closing the browser.

I would love to include the CapX but unfortunately it is not possible.
If anyone has any Ideas/suggestions however, please feel free to let me know.
If there is any other information required by yourself then also, let me know :)
I will respond ASAP.
Thanks in advance
Chris
B
8
S
1
Posts: 46
Reputation: 544

Post » Mon Feb 29, 2016 8:12 pm

Quick Bump :)
B
8
S
1
Posts: 46
Reputation: 544

Post » Mon Feb 29, 2016 8:39 pm

base64 ?
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon Feb 29, 2016 8:47 pm

Thanks for your reply!
I had no idea base64 existed :O I will have a look at that :)
Thanks <3
B
8
S
1
Posts: 46
Reputation: 544

Post » Mon Feb 29, 2016 9:09 pm

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests