Spawn object from a specific tile

0 favourites
  • 9 posts
From the Asset Store
Piano tiles
$9.99 USD
Template for a piano tiles game, fully documented in comments and video
  • Hi everybody,

    I like to make this method for spawn my object where a specific tile is on the map.

    when I make a multiple level with a different map, to make easy, I would like to spawn some objects (coins...etc) where a specific tile is on the map, and after that delete the tile.

    I think is possible with a collision, but without collision is possible? I have this dubt...

    someone have some suggetion?

    thank you very much!!

  • Use TileToPosition system expression to spawn on a specific tile.

    Do you want it to be spawned on colliding tile?

  • Use TileToPosition system expression to spawn on a specific tile.

    Do you want it to be spawned on colliding tile?

    I would like, when layout start, just spawn object where some tile are on the tilemap... i post the capx...

    I can do it with a collision maybe, but I prefer the first method... but I don't know how I can do it...

    Thank you

  • Top left tile is zero and so on....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Top left tile is zero and so on....

    thank you for the reply, but I mean,

    I need to spawn the object where the tilemap are in different way, but maybe is not possible... because with this method I can spawn the object with the specific x and y...

  • I need to spawn the object where the tilemap are in different way, but maybe is not possible...

    I don't understand. Can you draw a picture?

    because with this method I can spawn the object with the specific x and y...

    No.It spawn on tiles.For example,TiletoPositionX(1), spawn it on the 2nd tile horizontally(Since it starts with zero)

  • >

    > I need to spawn the object where the tilemap are in different way, but maybe is not possible...

    >

    I don't understand. Can you draw a picture?

    >

    > because with this method I can spawn the object with the specific x and y...

    >

    No.It spawn on tiles.For example,TiletoPositionX(1), spawn it on the 2nd tile horizontally(Since it starts with zero)

    yes different but it's the same... because I need to draw the code anyway... and with the tilemap you can't set a perfect axis....

    my method it's for save time, when you draw on the tilemap, you can save the tilemap in one JSON file... I'm thinking about if is possible to spawn the object where the tilemap is without write anything...

    like:

    for each single tile, where the tile is "1", spawn a object...

    with the collision you can do it, make a big vertical line and move in horizontal or vertical, and when the "big line" touch a tile numer "1", the "big line" spawn a new object where the tile number 1 is... I can do it actually but I would prefer without "scanning"

    thank you for the reply

  • I'm assuming you're after something like this.

    https://dl.dropboxusercontent.com/u/108 ... lemap.capx

  • I'm assuming you're after something like this.

    https://dl.dropboxusercontent.com/u/108 ... lemap.capx

    yes, this is a perfect example!!

    thank you very much <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

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