1

Keep potion effects on death

LoadUp's Avatar LoadUp4/15/17 4:17 pm
1 emeralds 8.8k 5
6/1/2017 1:35 pm
Bertiecrafter's Avatar Bertiecrafter
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's Avatar
LoadUp
Level 1 : New Miner
0

Create an account or sign in to comment.

5

1
06/01/2017 1:35 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
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
06/01/2017 7:07 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
(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
05/28/2017 2:04 am
Level 16 : Journeyman Engineer
VBDojnaz
VBDojnaz's Avatar
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
05/27/2017 12:01 am
Level 5 : Apprentice Miner
anonpmc792389
anonpmc792389's Avatar
[deleted]
1
05/26/2017 11:16 am
Level 16 : Journeyman Engineer
Cadermate
Cadermate's Avatar
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!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome