forum Forumsplay_arrow Minecraft fiber_manual_record Redstone

1

The Winner Detection (NEED HELP)

1 emerald2 replies317 views
created 02/05/2017 10:45 am by Devil_The_Killer
last reply 02/07/2017 11:12 am
Hey! I Just Have a doubt.

Suppose There are 7 people playing my map!
Now the players left are x, y, z.
a, b, c, and d are dead. After 2 min, y and z die.
How do I detect that all players have died except x??


:- Sorry If This Was a Bit Too Long.

Thx in Advance :<)
Posted by avatar
Devil_The_Killer
Level 1 : New Crafter
0

comment Login or register to post a reply.

2 replies

02/07/2017 11:12 am
Level 1 : New Crafter
Devil_The_Killer
Thx
02/07/2017 8:24 am
Level 55 : Grandmaster Cyborg
Pepijn
One time only
/scoreboard objectives add Deaths deathCount
/scoreboard objectives add alive


On a clock
/scoreboard players add @a Deaths 0
/scoreboard players set @a alive 0
/execute @a[score_Deaths=0] ~ ~ ~ scoreboard players add @a alive 1
/testfor @a[score_alive_min=1,score_alive=1]


When the testfor command succesfully runs it means there's only one player left alive, that player can be targeted by @a[score_Deaths=0] (so first test if only one person is left alive before targeting that player). Make sure to reset the Deaths scores when restarting the game.

I don't know if this is the best possible way, this is just what I first thought of.

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome