I am trying to make a game show and in order to do this I need to create a type of dice. But I need to make the sprite move as many times as the dice's number. Is it possible to do this and if it is how can I do that
Offline
Create a die sprite with 6 costumes.
Have the first costume show the die's first side (one dot), the second costume show the die's second side (two dots), and so forth.
When you need the die to be rolled, use this script:
when I receive [rolldie v] switch to costume (pick random (1) to (6)) broadcast [movesprite v]This will generate a random number from 1 to 6, and the die will display that number.
when I receive [movesprite v] go to x: ( ([costume # v] of [die v]) * (10) ) y: (y position)This will move the sprite the number of steps displayed on the die, multiplied by 10.
Offline
BTW, if you want a good die costume and random rolling sequence, I have made a project titled Rolling Die! that might be able to help you.
Offline