Load frames from external folder

  • Hey guys,

    I have looked forum but I could'nt find a way for this.

    Is there a way to load frames from external folder to a sprite

    or

    load images as a sprite from a folder ?

    Actually, I want to make a game that when you press a button game will get a random image from an external folder and show it to user.

    Thanks.

  • Yes. Sprites have a load image from file action.

  • EncryptedCow I can't find this action, there is a load image from url action but I tried it and it seems it won't work for me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know Construct very well and I would be happy to learn another way to do it.

    I would import all my images in the game and then use "Load from an URL". This command has not a clear name but it works with imported images : you just have to give the name of an imported image and it is loaded.

    It is not exactly what you want but it's the closest way I can find.

  • bilgekaan

    Last time I tried this it worked like this.

    Load image from URL -> NodeWebkit.AppFolder & "images/image.png"

    But only when exported.

  • Images must be included in the project Files folder first in order to be imported at runtime. once you have done that, you don't even need to provide an absolute URL to the action, just the filename.

    The new image will replace the current frame of animation. So in order to load a whole animation dynamically, you must first create an empty sprite in your project, with a set number of blank frames. Then you must load each frame one by one with the Load image from URL action. But you must make sure to go to the next animation frame between each loading action, using the Set Frame action, or each new image will keep overwriting the same frame

  • Apparently my answer didn't post last time. If you use load from URL you can input the images file-name and it will load from project files.

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