1

Keep potion effects on death

LoadUp 4/15/17 4:17 pm
9.4k
6/1/2017 1:35 pm
Hello everyone i am in a need of help. I am making a unforgiving minecraft Adventure map. But when the players die they just respawn and walk back like nothing happend. So i made a hasDied scoreboard to meassure their deaths. If they die once they get a slowness effect. The problem is when they and they get the potion effect they dont have enough time to click respawn so that means the effect has kicked off but when they do click respawn the effect dissapers. I need to know is there a way to keep effects on players even after death. I cant just use a repeating command block to give them the effect beacuse its situnational to when they die. I realy need a quick Response!! Also they effect doesnt last forever.
Posted by
LoadUp
Level 1 : New Miner
1

  Have something to say?

JoinSign in

5

Bertiecrafter
06/01/2017 1:35 pm
Level 72 : Legendary System
Another solution is giving everyone with a death slowness, unless the score is 0. However, instead you use this command:
/scoreboard players set @a[score_hasDied_min=1] hasDied 0 {Health:20.0f}
1
Pepijn
06/01/2017 7:07 am
Level 58 : Grandmaster Cyborg
(This post is decently old, but I decided to reply in case the OP or other people are still looking for a solution.)

There's a nice trick to achieve what you want.

I imagine you're using something like this:
effect @a[score_deaths_min=1] slowness 10 0
scoreboard players set @a[score_deaths_min=1] deaths 0


The problem with this is that it applies the effect immediately after a player dies instead of waiting for the player to respawn.

I suggest you use this instead:
effect @e[type=player,score_deaths_min=1] slowness 10 0
scoreboard players set @e[type=player,score_deaths_min=1] deaths 0


I switched @a with @e[type=player], which seems to do nothing at first glance. But the cool thing is that @e[type=player] won't detect players that are dead, which will result into the effect being applied only after the player has respawned.
1
Veabe
05/28/2017 2:04 am
She/They • Level 17 : Journeyman System
Theres no way to track what effects they had when they died. However, if it's a custom map, you could do as Cadermate told you...

I will build an example, then get back to you...
1
anonpmc792389
05/27/2017 12:01 am
Level 5 : Apprentice Miner
[deleted]
1
Cadermate
05/26/2017 11:16 am
Level 16 : Journeyman System
have the player respawn in a certain area according to how many deaths they have. When they respawn there, effect them with the potion and teleport them away!
1

Welcome