351: Checking mob deaths for a tower defence game. [Minecraft Map Making]

Subscribers:
3,670
Published on ● Video Link: https://www.youtube.com/watch?v=tyiM0M-WiVE



Game:
Duration: 33:45
106 views
9


Ep351: Checking when a mob dies so the player can get points when playing a tower defence game.

00:00 Intro
02:45 Setup
05:15 Summon mobs
07:25 Controllers

Better updated version for 1.19.4:    • 358: Mob death checking for Tower Def...  

Version: 1.19

Requested by: Torin

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

Check out my collabs on Coppit's channel:    / coppitj  

Join the CoppitCraft server that I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord:   / discord  

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.

Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" and "less than" with the appropriate angled bracket.

Commands used:

Setup:
IUN: scoreboard objectives add points dummy
CUA: scoreboard objectives add mob.id dummy
CUA: scoreboard objectives add mob.death dummy

Summon:
IUN: summon husk x y z {Tags:["my_mob","easy"], Rotation:[-90f,0f], NoAI:true}
IUN: summon husk x y z {Tags:["my_mob","normal"], Rotation:[-90f,0f], NoAI:true}
IUN: summon husk x y z {Tags:["my_mob","hard"], Rotation:[-90f,0f], NoAI:true}

Controller:
RUA: execute as @e[tag=my_mob,tag=easy] at @s unless score @s mob.id = @s mob.id run summon marker ~ ~ ~ {Tags:["follower"],data:{points:1}}
CUA: execute as @e[tag=my_mob,tag=normal] at @s unless score @s mob.id = @s mob.id run summon marker ~ ~ ~ {Tags:["follower"],data:{points:5}}
CUA: execute as @e[tag=my_mob,tag=hard] at @s unless score @s mob.id = @s mob.id run summon marker ~ ~ ~ {Tags:["follower"],data:{points:15}}
CUA: execute as @e[type=marker,tag=follower] unless score @s mob.id = @s mob.id store result score @s points run data get entity @s points
CUA: execute as @e[tag=my_mob] unless score @s mob.id = @s mob.id store result score @s mob.id as @e[type=marker,tag=follower] unless score @s mob.id =
@s mob.id store result score @s mob.id run scoreboard players add #id_holder mob.id 1

CUA: execute as @e[type=marker, tag=follower] at @e[tag=my_mob] if score @s mob.id = @e[tag=my_mob, distance=...01, limit=1] mob.id run tp @s ~ ~ ~
CUA: execute as @e[type=marker,tag=follower] at @s store success score @s mob.death unless entity @e[tag=my_mob,distance=...1]
CUA: execute as @e[type=marker,tag=follower,scores={mob.death=1}] run say Died!
CUA: execute as @e[type=marker,tag=follower,scores={mob.death=1}] run scoreboard players operation .global points += @s points
CUA: kill @e[type=marker,tag=follower,scores={mob.death=1}]

CUA: execute as @e[tag=follower] at @s if block ~ ~-0.2 ~ red_wool run kill @s
CUA: execute as @e[tag=my_mob] at @s if block ~ ~-0.2 ~ red_wool run kill @s
CCA: say Ouch!

Controller Test:
RUA: execute as @e[tag=my_mob] at @s run tp @s ~0.1 ~ ~




Other Videos By Infernal Device


2024-06-26361: Sword in a stone which can be pulled out. [Minecraft Map Making]
2024-06-25360: Interactive custom ceiling lights. [Minecraft Map Making]
2024-06-24359: Timed commands using a predicate. [Minecraft Map Making]
2024-06-23358: Mob death checking for Tower Defence. Updated. [Minecraft Map Making]
2024-06-22357: Rechargeable Gas mask with limited uses. [Minecraft Map Making]
2024-06-21356: Simple Locked door experiment. [Minecraft Map Making]
2024-06-20355: Lightable torches Updated. Added lifetime, light with arrows. [Minecraft Map Making]
2024-06-19354: Countdown timer with ticking sound. [Minecraft Map Making]
2024-06-18353: Modifying sidebar look for an effect selector. [Minecraft Map Making]
2024-06-17352: Floor crafting in 1.20.6. [Minecraft Map Making]
2024-06-16351: Checking mob deaths for a tower defence game. [Minecraft Map Making]
2024-06-15350: Is player following checkpoint path? Race lap counter. [Minecraft Map Making]
2024-06-14349: Did a player throw this item? Experiments. [Minecraft Map Making]
2024-06-13348: Torches that players can light and put out. [Minecraft Map Making]
2024-06-12347: Web Potion. Detecting where potions land. [Minecraft Map Making]
2024-06-11346: Infectious zombie plague. [Minecraft Map Making]
2024-06-10CoppitCraft Castle 050: Trees and a statue.
2024-06-10345: Code entry by copying held block to item display. [Minecraft Map Making]
2024-06-09344: Item frame that displays the first item in a chest. [Minecraft Map Making]
2024-06-08343: Updated. Big moving chain. [Minecraft Map Making]
2024-06-07342: Detecting weather. [Minecraft Map Making]



Tags:
minecraft
adventure map
map making
commands
command blocks
1.18
custom commands
redstone
map ideas
map suggesstions
custom maps
1.19



Other Statistics

Tower Defence Statistics For Infernal Device

At present, Infernal Device has 246 views spread across 2 videos for Tower Defence, with his channel publishing less than an hour of Tower Defence content. This makes up less than 0.30% of the total overall content on Infernal Device's YouTube channel.