How do I Save & Load in screenshots into the game

Get help using Construct 2

Post » Sun Aug 10, 2014 3:45 am

So basically I am trying to make a layout that allows the user to create their own character with a paint program like layout and it saves by the canvas screen shots, so basically I am trying to get the screenshots to save and load into the game when ever the player selects the option of custom character. webstorage isn't working for saving, and neither is invoking downloading and open from url and pointing to the file location. I am wondering how would I save this and load it into my game? Or am I looking at the whole thing wrong... At the end of the day I am trying to allow the user to create a character to use in my game.

DO NOT REPLY IF YOU DIDN'T BOTHER TO READ PLEASE. THIS HAS NOTHING TO DO WITH DISPLAYING JUST SAVING AND LOADING.
Last edited by undeadbobop on Sun Aug 10, 2014 4:37 pm, edited 2 times in total.
Need custom controls, video & sound options, and a PC like menu system with screenshot manager?
Image
B
20
S
4
G
2
Posts: 36
Reputation: 2,440

Post » Sun Aug 10, 2014 6:35 am

System: On canvas snapshot -> Sprite: Load image from CanvasSnapshot

From the manual:
Layout
CanvasSnapshot
Contains the resulting image from a Snapshot canvas action after On canvas snapshot has run. (Note this expression is not available immediately after the Snapshot canvas action - you can only use it after On canvas snapshot triggers.) The expression returns a data URI of the image file. This can be loaded in to a Sprite or Tiled Background object via Load image from URL, sent to a server or stored locally, or opened with the Browser object in a new tab to save to disk.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Aug 10, 2014 4:29 pm

Displaying it isn't the issue I already read through that, its like you didn't even bother reading before you replied, saving and loading it into the game is. I wanted the player to be able to create his own character by taking a screenshot of the canvas then saving it in which it would have to be loaded, so like idk they leave or close the game their custom character that they created isn't gone.
Need custom controls, video & sound options, and a PC like menu system with screenshot manager?
Image
B
20
S
4
G
2
Posts: 36
Reputation: 2,440

Post » Sun Aug 10, 2014 10:11 pm

undeadbobop wrote: its like you didn't even bother reading before you replied


good luck with it
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Aug 11, 2014 9:17 am

Found out how, Had to use a global varible to temp save the value to store into a webstorage local key value. But you sir didn't bother to read at all and you still continue to not read and insist my problem is that problem when that problem did not address it. It only said it can be stored locally through browser meaning invoke download. It was talking about saving. Not saving and loading.... Nor did it address how.
The thing you told me was how to display it. Nothing to do with what I said at all really...
Need custom controls, video & sound options, and a PC like menu system with screenshot manager?
Image
B
20
S
4
G
2
Posts: 36
Reputation: 2,440

Post » Sat Aug 16, 2014 4:20 am

@undeadbobop : Hi, can you give us example capx? I dont know how to connect between global variable to webstorage. Thank you for your help
B
36
S
13
G
1
Posts: 88
Reputation: 3,096


Return to How do I....?

Who is online

Users browsing this forum: varr and 3 guests