How do I use more than one bitmap for tilemap instances?

Get help using Construct 2

Post » Fri Jun 05, 2015 2:45 am

Hello,

Im trying to find techniques for making tile based building more dynamic in my games. Most of my games end up having at least one tile based interface or game play so not having to define new tilemaps statically at construct time in each new game would be useful. My technique is to put data uris into an array for each bitmap ( the bitmaps have the tiles ), then run a create function for a map and provide an index in the array to use in the bitmap for the "Load from URL" action. The idea is that I reuse the functional code for creating the tilemap and then tell it what image data from the array to use for its skin/tileset.

The problem is that for all my tilemap instances, once I run the 'Load from url', it updates all instances with the new load. For example if I had 3 tilemaps and set some tiles into them, whatever I set the tiles to last with 'Load from url', all instances update; even if I create all kinds of convoluted ways to get the specific instance( using instance id, using global vars, using Self, using on Create, using uid, crazy pick all situations, etc. ). No matter what I do all instances update when I load any single instance.

Is there a way to do what Im trying or is the tilemap class meant to work as multiple instances of a tilemap all of whom share the same bitmap at any given tick?

Sorry if its a weird question, thanks for any insight.
B
5
S
1
Posts: 11
Reputation: 424

Post » Fri Jun 05, 2015 1:59 pm

All instances of a given tilemap object share a single bitmap. No matter how hard you try, it is simply not possible. Sorry... :(
B
75
S
31
G
27
Posts: 1,014
Reputation: 20,763


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests