452: Simple dice rolling [Minecraft Map Making]

Subscribers:
3,590
Published on ● Video Link: https://www.youtube.com/watch?v=k4n_MumRElg



Duration: 0:00
287 views
19


Membership:

Ep452: Rolling two dice and displaying it to the players.

Idea by: Almogus
Command help by: Clouser

00:00 Intro
01:10 Setup
01:45 Roll one die
07:35 Roll two dice

Version: 1.21

Commands, builds, hacks and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:

The Discord server I am usually on: https://discord.gg/amU84KykEu

The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.

Commands used:

Setup:
IUN: scoreboard objectives add value dummy

Roll dice:
IUN: data remove storage id:temp dice
CUA: execute store result score die_01 value run random value 1..6
CUA: execute if score die_01 value matches 1 run data modify storage id:temp dice append value "⚀"
CUA: execute if score die_01 value matches 2 run data modify storage id:temp dice append value "⚁"
CUA: execute if score die_01 value matches 3 run data modify storage id:temp dice append value "⚂"
CUA: execute if score die_01 value matches 4 run data modify storage id:temp dice append value "⚃"
CUA: execute if score die_01 value matches 5 run data modify storage id:temp dice append value "⚄"
CUA: execute if score die_01 value matches 6 run data modify storage id:temp dice append value "⚅"

CUA: execute store result score die_02 value run random value 1..6
CUA: execute if score die_02 value matches 1 run data modify storage id:temp dice append value "⚀"
CUA: execute if score die_02 value matches 2 run data modify storage id:temp dice append value "⚁"
CUA: execute if score die_02 value matches 3 run data modify storage id:temp dice append value "⚂"
CUA: execute if score die_02 value matches 4 run data modify storage id:temp dice append value "⚃"
CUA: execute if score die_02 value matches 5 run data modify storage id:temp dice append value "⚄"
CUA: execute if score die_02 value matches 6 run data modify storage id:temp dice append value "⚅"

CUA: title @a times 2 20 2
CUA: title @a title {"storage":"id:temp", "nbt":"dice[]", "separator":""}
CUA: title @a subtitle "You rolled:"

CUA: scoreboard players operation total value = die_01 value
CUA: scoreboard players operation total value += die_02 value