How do I place Objects on specific Tile Types on a Tile Map

0 favourites
  • 9 posts
From the Asset Store
Two types of minimap: "full map" and "player is the center" (square map and radial map)
  • Can I, for example have a tile map with black tiles and blue tiles, can I detect all my placed black tiles (same Tile ID) and place a specific object on all of them, and place another such on all blue tiles.

    Thanks in advance, and sorry if its been discussed I just can't find this specific scenario wich eludes me so far.

    Cheers!

    P.S. Place an object on Load Layout for example, by placin something on the X, Y coordinates of each and every tile of the picked sort (for example, black)

  • Try Construct 3

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

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

    I don't undesrtand all what you have tell but I think that this plugin can help you :

  • Hey, thanks for fast responce.

    The thing is, as I understand it, every tile in the Tile Map has an ID...for example I have a tilemap object with only 2 tiles to pick from, one Black (Tile ID 0) and one Blue (Tile ID 1). I paint the whole object in black tiles and just paint a river with the blue tiles. I want to run an event, that upon loading the layout Picks all the Black tiles painted, and places an object of choosing upon it - not important, and then picks all the blue tiles painted and places a another object on all of them, something like:

    Conditions: On start - Pick All Black Tiles

    Actions: Create Object on X.Y of Black Tile (Tile ID 0 or somthing of the sort)... can I do that in anyway?

  • Of course you can do this thing. Can you send your .capx file ?

  • At work currently - been browsing through the forum and can't find an explanation that I understand on the subject. I'll upload and example later on though, thanks!

    P.S....my curiosity is killing me though, how will I go about doing that?

  • dropbox.com/s/sit25qtanz28tiu/TileTest.capx

    I made a quick test project. I want to do the following:

    On Layout Start, I want to Create the IsLand sprite object on all the Black tiles and the IsWater on all the blue tiles. Just these two tiles in the entire tilemap for this particular example, although won't be the case in the larger project.

    I would immensely appriciate any help on how i can actually do that.

    Very thanks in advance!

    Cheers!

  • Hi, now I understand and, unfortunately, I tell you that it's impossible with tile map like this. You have to use sprites...

    Sorry for have told that it's possible......

  • You have to loop through all tiles, and create the correct sprite according to the tile ID. Here's your file with the event that does just that.

    https://dl.dropboxusercontent.com/u/700 ... eTest.capx

  • My hat goes off to you sir, to both you for the response. This is exactly what I needed. Still new but you guys are awesome. Thanks again!

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