128: Using a trigger to run a command. [Minecraft Map Making]
Ep128: Two ways to use a trigger to run a command. One that runs a command anywhere, and one that targets the player that used the trigger.
Java Version: 1.19
Commands, builds and ideas for people making their own Minecraft maps.
Check out my collabs on Coppit's channel: https://www.youtube.com/c/CoppitJ
Join the server I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord: https://discord.gg/KNSmPWdnfG
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: YouTube formatting may make some of these wrong. :)
Create trigger:
IUN: scoreboard objectives add testTrigger trigger
CUA: scoreboard players enable @a testTrigger
Execute command:
RUA: execute as @a[scores={testTrigger=1..}] run setblock 26 56 15 redstone_block replace
CUA: scoreboard players set @a testTrigger 0
CUA: scoreboard players enable @a testTrigger
Execute command as or at target:
RUA: execute as @a[scores={testTrigger=1..}] run tag @s add triggerTarget
CUA: scoreboard players set @a testTrigger 0
CUA: scoreboard players enable @a testTrigger
CUA: execute as @a[tag=triggerTarget] at @s run say My name is @s
CUA: tag @a remove triggerTarget
Other Videos By Infernal Device
Other Statistics
Minecraft Statistics For Infernal Device
At present, Infernal Device has 182,939 views spread across 869 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.