1

Shared health bar

23P1C's Avatar 23P1C4/30/20 6:31 pm
1 emeralds 578 1
5/3/2020 11:55 pm
ElectroSheep_'s Avatar ElectroSheep_
I dont know if this is possible, but I want to make a datapack where everyone on the world shares the same health. All the ways ive been trying havent worked, but the trickiest part is dealing the damage, spawning silverfish wont work since they take a bit to try to damage the player, and instant harming deals too much. Maybe I need to redo everything and do stuff differently, but i really cant figure it out. Can anyone help?
Posted by 23P1C's Avatar
23P1C
Level 1 : New Miner
0

Create an account or sign in to comment.

1

ElectroSheep_
05/03/2020 11:55 pm
Level 42 : Master Procrastinator
history
ElectroSheep_'s Avatar
I think this could work (haven't tested it, just theorising here):

1. set up a scoreboard to keep track of the global health

2. compare all players' health values to that score

3. if any player's health is lower than the score, set the score to the value of said player's health

4. set everybody else's health value to the scoreboard

5. loop to stage 2



Again, I haven't tested this. But I see no reason it wouldn't be possible.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome