# Dice Roll Help

**URL:** <https://forum.kirupa.com/t/dice-roll-help/257558>\
**Category:** programming\
**Created:** [April 15, 2008, 10:19am UTC](https://forum.kirupa.com/t/dice-roll-help/257558 "2008-04-15T10:19:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flipsa](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@flipsa](https://forum.kirupa.com/u/flipsa)\
**Post date:** [April 15, 2008, 10:19am UTC](https://forum.kirupa.com/t/dice-roll-help/257558/1 "2008-04-15T10:19:18Z")

</div>

Hello everyone.

I am in the process of making a board game, but I can’t seem to work out how to make a clickable dice roll and then move the pawn depending on the number which has landed.

I’m using a multidimensional array to make my board which is 10x10.

player = {xsquare:0, ysquare:9};

This code tells the pawn to show on the bottom left square which is the starting square. I want the pawn to move from that position to xsquare:1 if the dice lands on 1 and xsquare:6 if it lands on 6 for example.

When the square reaches x:9 and y:9, it will move up to x:? y:8 and start moving left therefore not going outside the board if that makes sense. The same applies to when its at x:0 and y:8 etc. where it will move up to x:? y:7 and start moving right again in a zig zag direction.

I’ve already made a dice mc with 6 frames for each number.

I know its a lot to ask, but I’ve been trying to figure this out for days and any help would be appreciated. Thanks!
