Tilemap

0 favourites
  • 3 posts
From the Asset Store
Enchanted Forest & Cave 16x16 Tilemap with Environment Sprites
  • Hi

    if i wanted to create a grid type game (snakes and ladders) would the tile map tutorial / object be a good space to start?

    basically i want the player to move through the squares based on a numerical input (dice) like the attached image and detect if the player is over an orange square then show a random card...i assume this would be reasonably easy but i am not sure as the best way to approach it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes,that seems very well possible. Other than making the grid look tight, tilemapping wouldnt even be required though.

    I would go about it like this: add the orange spaces to a family, or track if the player is on top of them by using their UID, or a global variable that stores a name of the tile however you want to name it.

    Start out with a global variable as zero or one depending on where your pawns start (before or on the first space) and add the number of eyes on the die to that variable each time you roll. Then, accordingly, move the player to the space belonging to the stored variable.

    To check if they are on the space check if the player Object is overlapping either one of the family objects that you created or on top of a field with the UID or global variable belonging to the orange fields. Then also add the condition that the die must not be active (i.e. boolean true when rolling), and that a card draw must be triggered once after the player Object seems to be overlapping an orange space. This once can also be done by a Boolean such as "CardDrawnThisTurn is false" as a condition, making it true after triggering the event, and making it false again on your next dice throw.

  • many thanks for your help...i will see if i can use this approach

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