How do I make my tilemap objects load from files?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi,

    I want a group at the start of the frame to load a new image into the tilemap objects, but not from a URL, from a file... specifically I intend for the game to be exported via Node Webkit to Windows, Mac and Linux.

    Can someone please set me straight on what I would put in the "load image from URL" action to get it to load an image from the install folder of the game for example?

    Thanks very much.

    -Mike

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I want a group at the start of the frame to load a new image into the tilemap objects, but not from a URL, from a file... specifically I intend for the game to be exported via Node Webkit to Windows, Mac and Linux.

    Can someone please set me straight on what I would put in the "load image from URL" action to get it to load an image from the install folder of the game for example?

    Thanks very much.

    -Mike

    You can use the NW.JS to do that. Like so:

    NWjs.AppFolder & "Filename.ext"
    [/code:3rkm6ej3]
    
    However be advise that this wont work during development, so a good idea is to hook up a System -> is in preview so you can test it just using a fixed path.
    
    Since you want to load it during runtime, I guess your intention is to load several different ones? However im pretty sure you will run into problems with this. Due to how graphic is handle in C2, at least images have this problem which requires some workarounds that are not really good. Anyway if that is not your intention you should have no problem doing it that way.
  • Thanks.

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