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!