How do i move a sprite after roll dice in board game?

0 favourites
  • 4 posts
From the Asset Store
a basic game template with which you can show your own creativity with interactive and exciting rolling of ion dice!
  • I'm making a Board game with dice and 2 players. How can i move sprite after roll dice if i use "MoveTo" Behaviour? It's a turn-based, dice roll, sprite1 moves, then next person rolls, sprite2 moves, so on and so on. Please help me <3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In general each tile in the board game could have a number identifier as an instance variable. Say player starts at 0, you roll a 4, the player position is now 4. You pick the tile that is var=4 and 'MoveTo' its position. If you then roll a 3 the player position is now 7, you pick the tile that is var=7 and 'MoveTo' etc.

    If you return to the starting tile like in any board game where it loops around, you need extra logic to calculate hitting the last number and then starting the remaining steps from 0. And of course the 2 players need separate positions, the position would be a global variable.

  • Thank you very much <3. i set global value already but t did n't work. This is my game. Can you spend a little time to check and teach me how to fix my game <3

    drive.google.com/open

  • Hi, you can perhaps do it another simple way:

    Add a Global Variable like #ofMoves

    When you roll a dice add the result to #ofMoves

    Now, I assume your board tiles are at exact same distances from one another:

    Then you simply tell your player to move #ofMoves times on the board.

    If you need to change angle you can setup an extra invisible sprite on your tiles whereby when the player comes to the tile it determines which is the angle for the next move.

    Best of luck,

    COSMOS

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