451: Dialogue using interaction entities [Minecraft Map Making]
Membership:
Ep451: Changing episode 414 Villager dialogue to use interaction entities instead.
Question by: aggiephnx13
00:00 Intro
00:30 Summon interactions
01:25 Setup score
02:00 Controller - Main
05:00 Controller - Bob
08:00 Controller - Job
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 talk dummy
Summon:
IUN: summon interaction ~ ~1 ~ {Tags:["int", "Bob"]}
Controller - Main
RUA: execute as @e[type=interaction, tag=int] at @s on target run tag @n[type=interaction, tag=int] add talk
CUA: execute as @e[type=interaction, tag=int] store success entity @s interaction.player[] int 0
at @s on target run scoreboard players add @n[type=interaction, tag=int] talk 1
Controller - Bob
RUA: scoreboard players set @e[type=interaction,tag=talk,tag=Bob,scores={talk=4..}] talk 1
CUA: execute at @e[type=interaction,tag=talk,tag=Bob,scores={talk=1}] run tellraw @a[distance=..8] "Bob: Hi, im Bob!"
CUA: execute at @e[type=interaction,tag=talk,tag=Bob,scores={talk=2}] run tellraw @a[distance=..8] "Bob: What's up?"
CUA: execute at @e[type=interaction,tag=talk,tag=Bob,scores={talk=3}] run tellraw @a[distance=..8] "Bob: Today is a wonderful day!"
CUA: tag @e[type=interaction,tag=talk,tag=Bob] remove talk
Controller - Job
RUA: scoreboard players set @e[type=interaction,tag=talk,tag=Job,scores={talk=3..}] talk 1
CUA: execute at @e[type=interaction,tag=talk,tag=Job,scores={talk=1}] run tellraw @a[distance=..8] "Job: Waahahha Hoo"
CUA: execute at @e[type=interaction,tag=talk,tag=Job,scores={talk=2}] run tellraw @a[distance=..8] "Job: Nim nim nim"
CUA: tag @e[type=interaction,tag=talk,tag=Job] remove talk