1
Keep potion effects on death
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.
Create an account or sign in to comment.
5
1
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}
/scoreboard players set @a[score_hasDied_min=1] hasDied 0 {Health:20.0f}
1
(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:
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:
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.
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
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...
I will build an example, then get back to you...
1
[deleted]
1
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!