How do I Check if a tile is a lava tile

0 favourites
  • 6 posts
From the Asset Store
Tileset for action or adventure platformer games with underground, cave, lava, mine, and or similar themes.
  • Hi I am trying to check if the tile on the tilemap at the right of the player sprite is a lava tile

    ofcourse i can make allot of conditions saying: compare tile at (player.X/playerSize)+1,player.Y/playerSize = NumberOfTheTile

    but i want to check if the tile is a lava tile currently my lava tiles have number 2, 5, 8 and 11

    I was thinking if there was a expression to make one conditions saying: compare tile at (player.X/playerSize)+1,player.Y/playersize = Expression(2,5,8,11)

    but i cant find it anywhere

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry I didn't really read the beginning lol. So I'm sure this isn't what you were looking for. I do that sometimes.

  • I dont think I understand what you are trying to do.

    I am trying to check if a tile is either 2,5,8 or 11.

    but currently i have to do this:

  • basicly i want to be able to have only one block instead of 4

    for example by using a expression: X Tile((sprite.X/32)+1, (sprite.Y/32)) = ???(2,5,8,11)

  • You can "write" your own expression using a function.

    And then, you use it like this :

    Compare Two Values

    1st value : Function.Call("IsValuePresent", searchedValue, value1, value2, ...)


    2nd value : 1

  • thanks i will try that

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