0 Favourites

How do I make my tilemap objects load from files?

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,499
DMT2005's avatar
DMT2005
Unread sticky
1 Favourites
C2 Games made with CocoonIO
136 89,826
minhcuong's avatar
minhcuong
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff