#Custom Health with Armor.
1 messages ยท Page 1 of 1 (latest)
yeah i know but I need to give and remove the HP when they equip the armour
for example, they equip an iron helmet and it adds +20 HP, and if they un-equip it, it removes that HP
i have an idea
scoreboard objectives add hpPoints dummy
scoreboard players add @a hpPoints 0
scoreboard players add @a[hasitem={item=iron_helmet,location=slot.armor.head}] hpPoints 1
effect @a[scores={hpPoints=1}] health_boost 1 0 true
scoreboard players set * hpPoints 0
this will only work as a function
I did find a way to do it actaully, but its very long lmao
leme show you what i came up with
okay
it's okay too
the (itemUse:) thing is a script that detects when u click the item
it works pretty well, the downside is, it wont work if they drag the armour on
/scoreboard players add @a[hasitem={item=diamond_helmet,location=slot.armor.head}] Health 20```
already figured it out
thats so in optimal tho, why would u choose to do that instead?
cause this isnt effective
its just a one-time add
its not
its constant
replied to the wrong msg, my bad, but it isnt one time, u can have it running aconstantly
not with how the health system works in my map
you got Health = your current HP
and then HealthCap
the max hp
so whats the problem?
bruh...
that system is compatible with ur system
just adjust the max health in the commands, whats the problem, i dont understand
tell me how what u wrote is gonna remove the HP as soon as they un-equip the armour
if you set max hp to 0
they gona die
over and over
/execute as @a if score @s Health > @s Max.Health run /scoreboard players operation @s Health = @s Max.Health
๐
whats the problem then?
thatll set the current health to the max health if the current health exceeds the maximum
then there isnt a problem and the other system i provided above would be perfectly suitable
i needed a way to give temporary HP to a player upon equipping a specific armour and then remove ONLY that bit of HP from the max amount when they take the armour off
and i already figured out how I can do it on my own
bruh thats what i gave u
this does that
thats still not helpful
1 universal command, and then 1 command per armour type
how
unless i added another score for the health stats they gain
either way i aint changing it now
bruh, why would u ever choose to use an in optimal system over a much more optimal one
cause its hard to explain to you why that wont work out well
its not like you have any idea of the stuff thats going on in my world
no, but i do have a great idea of command systems which definitely helps
true it can, but its still not easy to just explain