How do I save the image loaded by File Chooser?

0 favourites
  • 7 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • The options Save and Load work very well to save highscore, and this kind of things. But I would like to save the image loaded by file chooser, so, when the user goes to the aplication, he wont need to choose that image again, cause it will be saved. How can I do that?

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You may be able to save the image binary into a global variable (to be saved with the built in save/load) or a local storage key. If not, you could at least save the path of the chosen image as a variable/local storage to load again next session.

  • So can you help me in what the Event Sheet should look like to do it? I am sorry, I am very lost at this part...

  • Until now, I did File Chooser, on changed, load image from "SpriteFoto".FileURLAt(0). What should I write to save this image loaded in a variable? Pls, I am desperate :v

  • The idea, in this case, is to do a gemer profile, kinda like the facebook. The user will be able to choose a photo for his gamer profile, and be able to change it, whenever he wants. The problem is, the image loaded doesnt still there, and I have no idea how to save this image in a global variable. Any help?

  • construct.net/en/make-games/manuals/construct-3/plugin-reference/ajax

    construct.net/en/make-games/manuals/construct-3/plugin-reference/binary-data

    The AJAX plugin is actually the key here.

    Binary data

    The AJAX object can receive resources as binary, and also post binary data, using the Binary Data object. This is also useful to fetch local resources like canvas snapshot URLs or video recording URLs, and load them in to a Binary Data object to do something else with them, like save it to storage or upload it to a server.

    Set response binary

    Use this action before a Request action to read the response in to a Binary Data object instead of returning it as a string in the LastData expression. This allows for non-text resources like images to be fetched and processed directly.

  • Thk u so much for the hint, but I never used Ajax, so that really does not say much to me. I really need a tutorial, step by step, on how to save the image loaded by File Chooser inside the game, so it going to still there when the user get out of the game, and comes back. And the user going to still be able to change that image, whenever he wants, and that new image, also, will be there when he get out of the game, and come back again. If you know some link for the forum, on youtube, explaining the Event Sheets to do it, step by step,it would be really helpfull, bcz I really do not finding it. If not, thank you so much, anyway, you were the one who offered me some help so far.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)