Loading sprites from a folder

  • Hi!

    Guys I am working on a game that will have lets say 100 items. Each item will be a sprite, right?

    My question is, once I have a event on my game that says, character use sword ID1234, can I pull this sprite sword from a folder instead I have it preloaded in my game layout?

    I would like to have a option to each time my character pickup a new weapon, my game read this event and load this image from a location instead I have hundreds images loaded already.

    Hope you can understand my question.

    Thanks!!!

  • If I'm understanding you correctly, you can save the images as project files, and load them via the "Load from URL" action.

    Using project files in Construct 2

  • I have read what you sent me and I guess this it, but I could not figure how to make it here in my project lol

    Do I need to add webstorage, Ajax or something else to my project?

  • All you should need to do is load the images as project files, and then call them using the Load image from URL action.

    Project Files

  • Thanks alot zatyka!

    I will keep on reading it cause I did not figure it out yet. I guess I understood your explanation, I just need to figure how to make it work.

    If you have any capx file as example I would appreciate alot, if not, no problem, I will learn this one way or other :P

    Thanks!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okkkkkk I was in the right path!

    Let me understand that... doing this will make my capx goes larger in size, however my html website will only load the images when they needed right?

    Another question, if instead a .jpg file I wish to add animation, should I create a .capx with only a animation inside?

    Thanks alot zatyka!!! Very helpful!!!!!!!!!!!!

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