Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to get your character to move with the value off the dice
- raspscratch
-
New Scratcher
2 posts
How to get your character to move with the value off the dice
HI all, i am setting up a monoploy style board game up for my son to edit. Just how do you get the character to move with the value of the dice.
Thank You
Stay Safe and keep Scratching.
Thank You
Stay Safe and keep Scratching.
Last edited by raspscratch (May 4, 2020 19:46:08)
- Oumuamua
-
Scratcher
1000+ posts
How to get your character to move with the value off the dice
I´m going to guess
You create a sprite with six cotumes showing, well, you know…
You create a sprite with six cotumes showing, well, you know…
when [ v] key pressed
wait until <not <key [ v] pressed?>>
repeat (pick random (10) to (20))
next costume // you can add a wait block, lets say 0.2 secs
end
broadcast [move v]
when I receive [move v] //in player sprite
Here i cannot say anything more ::grey
([costume# v] of [dice v] )// you just use this reporter it will be a number 1 to 6
Last edited by Oumuamua (May 4, 2020 20:26:50)
- raspscratch
-
New Scratcher
2 posts
How to get your character to move with the value off the dice
Thank you, I will give it a go.
- -OkWow-
-
Scratcher
28 posts
How to get your character to move with the value off the dice
Or you can do this if that does not work

when green flag clicked
forever
if <key [ v] pressed?> then
set [Dice] to (pick random (1) to (6))
move (Dice) steps
end
end

- Discussion Forums
- » Help with Scripts
-
» How to get your character to move with the value off the dice