How to make Tiles change if surrounded by other tiles?

0 favourites
  • 3 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hi, how can we change the tile if it is surrounded by one or more tiles.

    ( given that grass tile has 5 images 1] grass on top,left,right. 2] grass on top, left 3] grass on top,right 4] grass on top 5] tile without grass(dirt tile). also there are other types of tiles, so to have these many tiles with multiple images, do we need to import multiple tilemaps consisting of different types of tiles for individual platform like grass, metal, bridge, stone...?)

    for eg:

    https://imgur.com/a/bePFZ7m suppose I have my default tile which has grass on top, on left & on right sides

    if I add another tile on it's right side then both the tiles should connect i.e. first tile should change automatically to other image which has grass only on top and left side, the second tile should only have grass on top and right side when the layout starts and update image of all tiles if it is surrounded by other tiles.

    how can we perform the following checks and update the tile image according to it?

    has tile on top, has tile on left, has tile on right, has tile on bottom.[/code:1yc7vupw] 
    [b]also how can we do following checks on sprite objects as we can do a lot more cool stuff with sprites and we have multiple animation frames for a sprite which makes changing the image much easier.[/b]
    [code:1yc7vupw]has sprite on top, has sprite on left, has sprite on right, has sprite on bottom.[/code:1yc7vupw] 
    
    Thanks <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
  • See these two files:

    https://www.dropbox.com/s/8zap7yuhwdb0p ... .capx?dl=0

    https://www.dropbox.com/s/r1em8npglbdso ... e.png?dl=0

    (I downloaded them from some old post, which unfortunately I can't find now)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000, thanks m8, you seem to have answer to my every questions .

    will have a deeper look at the .capx and the image. I'll get back to you if there's something else to be solved

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