1

Advice for Boss Mobs in Adventure Maps

Sordid's Avatar Sordid5/23/19 5:38 pm
1 emeralds 159 1
5/23/2019 6:09 pm
Isz's Avatar Isz
I have been working on an adventure map for maybe a month now and I had recently run into an issue where I had a simple boss enemy, a zombie with a guardian riding on its head. My issue was that I needed a way of detecting when the player had killed either of these two mobs so that the other one would die and a cutscene would play.

I have found a crude solution by giving both entities an item the player would not normally obtain during the map (barrier blocks, in this case) and having it so that once one mob was killed, a repeating command block would detect the item and activate a string of other commands, with one killing the mob that was still alive and triggering my cutscene. I also have a second repeating command block that automatically kills this specific item type when it detects it, so I don't have to worry about players picking it up.

Here's the execute command if you're needing it:

/execute if entity @e[type=INSERTMOBHERE,distance=..INSERTNUMBERHERE] run INSERTCOMMANDHERE

There is probably a better way of doing this via scoreboards, but I have yet to find a good tutorial for it. If you do know how to make this work, please let me know.
Posted by Sordid's Avatar
Sordid
Level 2 : Apprentice Architect
1

Create an account or sign in to comment.

1

4
05/23/2019 6:09 pm
Level 46 : Master Architect
Isz
Isz's Avatar
give the mobs a tag each and when it no longer detects one of these tags, triggers cutscene.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome