So i want to create a pvp arena, and i need to recognise player death to put +1 death point to the score board (what is basically switch a lamp on with command block) also set fire particles to the exact moment when the enemy dies, and it would be cool if i can teleport all players back to starting point when one of it died. Is it possible to do it?
The Meaning of Life, the Universe, and Everything.
Location:
Earth
Join Date:
11/24/2017
Posts:
98
Minecraft:
Rocker09871
Discord:
Rocker09871#9302
Member Details
you can make a scoreboard detecting player deaths and have a command block detecting when a player dies:
first, run this command:
/scoreboard objectives add death minecraft.custom:minecraft.deaths
then, make a command block pointing into a second command block:
command block 1: repeating unconditional always active
execute if entity @a[scores={death=1}] run say a player has died!
command block 2: chain conditional always active
scoreboard players set @a death 0
then, you can replace the command after 'run' in the first command block with whatever command you want to run.
also, if you want to run multiple commands when a player dies, you can add more chain, conditional, always active command blocks between the blocks from above.
How to recognise player death with command block?
So i want to create a pvp arena, and i need to recognise player death to put +1 death point to the score board (what is basically switch a lamp on with command block) also set fire particles to the exact moment when the enemy dies, and it would be cool if i can teleport all players back to starting point when one of it died. Is it possible to do it?
/kill @e
you can make a scoreboard detecting player deaths and have a command block detecting when a player dies:
first, run this command:
then, make a command block pointing into a second command block:
then, you can replace the command after 'run' in the first command block with whatever command you want to run.
also, if you want to run multiple commands when a player dies, you can add more chain, conditional, always active command blocks between the blocks from above.
summon minecraft:armor_stand ~ ~0.5 ~ {NoBasePlate:1b,ShowArms:1b,ArmorItems:[{id:leather_boots,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_leggings,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:leather_chestplate,Count:1b,tag:{Unbreakable:1b,display:{color:11546150}}},{id:player_head,Count:1b,tag:{SkullOwner:"Rocker09871",display:{Name:'{"text":"ror","color":"yellow"}'}}}],HandItems:[{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}},{id:potion,Count:1b,tag:{Enchantments:[{id:fortune,lvl:32767}],Potion:"water",display:{Name:'[{"text":"Vegan ","color":"green","bold":true,"italic":false},{"text":"Water","color":"blue","bold":true,"italic":false}]'}}}],Pose:{RightArm:[-30f,-20f,20f],LeftArm:[-70f,30f],Head:[30f,0f]}}
thanks
/kill @e