How to load an image from the computer into my game

0 favourites
  • 2 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • Hi,

    In my game, I would like to give the player the possibility to load an image and put it on the stage, how do I do that?

    The player loads the image from his computer.

    I need the NWJS object, I suppose?

    The player clicks on the "Load image" button and then chooses an image on his computer

    and once validated, the image appears in its game.

    I've been looking, but I haven't figured out how to do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks to Dop2000 for helping me!

    To load an image into your game and display it on the scene, you will simply need a "File Selector" object and a "sprite", then you will need to set as a condition:

    "FileChooser" -> "On changed" ----> "Sprite" -> "Load Image From URL" -> "FileChooser.FileURLAt(0)"

    ----------------------------

    Merci à Dop2000 de m'avoir aidé !

    Pour charger une image dans votre jeu et l'afficher sur la scène, il vous faudra simplement un objet "Sélecteur De Fichiers" et un "sprite", ensuite il faudra mettre comme condition:

    "SélecteurDeFichiers" -> "L'ors d'un changement" ----> "Sprite" -> "Charger l'image depuis" -> "SélecteurDeFichiers.URLFichierA(0)"

    Voilà !

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