You are on page 1of 4

Dice Roll

By: Juan Daniel Jimenez


Noriega
7C
Program Explanation
I did this on a program called scratch, it’s more or les the same as Mblock but I had a Little of experience.

To start the program you have to click on the green flag and it Will salute you, then he Will give you the keybind to do the dice roll, the keybind is “B”,
then when you press “B” on your keyboard it Will give you a random number from 1 to 6.

I did this by putting the event box of hitting the green flag to then go to the looks box which Will make the character say “Hi!” to you, after that I putted a
text box down and setted it to make the carácter say “Press “B” to roll the dice”.

Then I chose another evento box and set the keybind to “b” and then I created the variable “DICE” and I chose the box to set dice to pick a random number
beetwen 1 to 6 and to finally end it all I used a text box to make the character say the result of the variable “DICE”.
Variables

→ The only Variable I used to do this is the “DICE” variable, I made this variable and setted it to
pick a random number between 1 and 6.
Blocks Used

→ I used the green flag that is an Event block to start the


commands.

→ I used the looks text and putted “Hello!” to make the


character salute the person who wants to roll the dice.

→ Then I used another looks text for speech and changed it


to say “Press B to roll the dice” so the user knows what
to do.

→ I used the key bind Event block and changed it to B to


start the dice roll.

→ I used the variable block to make the variable “DICE”


pick a random number between 1 and 6.

→ I used the looks speech box and changed it so the


character will say the result of the dice roll.

You might also like