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

Ойындар

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 checkin...
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 KZread 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 ~ ~

Пікірлер: 10

  • @vibre8815
    @vibre88158 күн бұрын

    comment for algorithm

  • @InfernalDevice

    @InfernalDevice

    7 күн бұрын

    2: The next little comment was also lazy and made his house out of sticks also spent the rest of the day playing. Once again the big bad algorithm came along and huffed and puffed and blew the stick house down. He gobbled up the lazy comment.

  • @torin1920
    @torin19209 күн бұрын

    thank you and I would love to see a better version

  • @InfernalDevice

    @InfernalDevice

    8 күн бұрын

    You're welcome. :) Ok, I'll do a version for 1.19.4 as well. We should be able to use passengers then, which hopefully means it won't matter if the mobs walk in the same space as each other.

  • @torin1920

    @torin1920

    8 күн бұрын

    @@InfernalDevice thanks , because on my map mobs walk in the same area multiple times

  • @InfernalDevice

    @InfernalDevice

    8 күн бұрын

    @@torin1920 I'll do the next one in 1.19.4. I think you said you are currently using 1.19.3 so upgrading the map shouldn't be to bad. :)

  • @torin1920

    @torin1920

    8 күн бұрын

    @@InfernalDevice okey

  • @InfernalDevice

    @InfernalDevice

    2 күн бұрын

    Hello. I redid the death checking for version 1.19.4: kzread.info/dash/bejne/c5V7u9Ksj6STprg.html

  • @yoyojonas
    @yoyojonas4 күн бұрын

    Hey can you also show us how to make the pathing?

  • @InfernalDevice

    @InfernalDevice

    4 күн бұрын

    Hello. :) You can check out these videos to see if they help you: Ep 5 - Make a mob follow a path: kzread.info/dash/bejne/hYylx7SIdbTQqLQ.html Ep 200 - Controlling villagers with books: kzread.info/dash/bejne/o6mu1aaLfcevp9I.html Ep 282 - Updated patrolling guards: kzread.info/dash/bejne/qHxou5mpd9zTm7A.html

Келесі