# How do i make a character move to whats on the dice

**URL:** <https://forum.kirupa.com/t/how-do-i-make-a-character-move-to-whats-on-the-dice/311446>\
**Category:** Uncategorized\
**Created:** [July 6, 2010, 8:42pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-character-move-to-whats-on-the-dice/311446 "2010-07-06T20:42:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt035](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@matt035](https://forum.kirupa.com/u/matt035)\
**Post date:** [July 6, 2010, 8:42pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-character-move-to-whats-on-the-dice/311446/1 "2010-07-06T20:42:13Z")

</div>

so i have 2 dices and the code for them are

function rand(a:Number, b:Number){  
var del:Number = b-a;  
var num:Number = Math.round((Math.random()\*del)+a);  
return num;  
}

test.onRelease = function(){  
var num = rand(1,6);  
die1.gotoAndStop(num);  
die1.\_rotation = rand(0,360)  
die1\_text = "Die 1’s Value is: "+num;

```
var num = rand(1,6);
die2.gotoAndStop(num);
die2._rotation = rand(0,360);
die2_text = "Die 2's Value is: "+num;

```

}

and i want to know how do i make a counter(player) move to the number thrown on the dice ?

if you need to know anything else let me know and if you need the .fla file also let me know and ill get back to use asap
