2

I'm trying to make something like the life link challenge for a realm but can't use a plugin on it so I've been trying to make it using command blocks.

it's in 1.14.4 so old commands won't work

3

1 Answer 1

4

First, type in chat:

/scoreboard objectives add deaths deathCount

Then, set two command blocks, one set to 'repeat' and 'Always active' and another linked to the first set to 'chain', 'Always active' and 'Condicional' as in this image. Then, you add the following commands respectively:

/execute as @a[scores={deaths=1..}] at @s run scoreboard players set @a deaths 0
/kill @a

The way it works is simple: If a players die, the scoreboard will register and add a point to whoever died. After that, the command block will execute as the player (note that the command could go 'execute if @a[scores={deaths=1..}]') and clear everyone (including his) score. The second command will only activate if the first one was sucessful and if it happends, the command will kill every player in the server.

To avoid such, you can do:

/tag [PlayerName] add LifeLink

And modify the first two commands as well as adding another one set to 'repeat' and 'Always active':

/execute as @a[scores={deaths=1..},tag=Lifelink] at @s run scoreboard players set @a deaths 0
/kill @a[tag=LifeLink]
/scoreboard players set @a[tag=!LifeLink] deaths 0

It will only kill and activate the commands if such player is set with the LifeLink tag.


Here are some Images to help build it.

Place the first block down: enter image description here

Shift and then right click to place the second one. Make sure they are pointing in one direction (http://prntscr.com/p9kwvb). enter image description here

Open the first command block. Paste the command bellow and set as 'Repeat' and 'Always Active':

/execute as @a[scores={deaths=1..}] at @s run scoreboard players set @a deaths 0

enter image description here

Open the second command block. Paste the command bellow and set it to 'Chain', 'Conditional' (Super important, don't miss it) and 'Always Active'.

/kill @a

enter image description here

The final product. enter image description here

6
  • 1
    Wait, which commands do you put in what command blocks? I never have used command blocks before so I'm very confused. Also, does this work for the Microsoft version?
    – Chloe
    Sep 21, 2019 at 19:37
  • This is specifically for the Java/microsoft version.You can get a command block by typing /give @s command_block and you can change their color/type by clicking in the impulse option. Place two commands blocks like in (prntscr.com/p7zm1z) and set them like mentioned in the answer above (always active, condicional...). Before putting the commands in the blocks, type in chat the first command (/scoreboard add...). After that, put in the commands 'execute as...' and 'kill @a' respectivly. Done!
    – BunnyMerz
    Sep 22, 2019 at 3:56
  • I'll update the answer tomorrow with screenshots to make it easier, so don't worry if the comment didn't quite help.
    – BunnyMerz
    Sep 22, 2019 at 3:58
  • @Chloe Check the anwser, just edited it. Sorry for taking so long.
    – BunnyMerz
    Sep 23, 2019 at 0:01
  • The first command for the scoreboard hasn’t been working for me. it keeps saying Syntax error. Is there anyway to still do this or around this?
    – jenna
    May 12, 2020 at 8:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .