#Heal using the Scripting Api
1 messages · Page 1 of 1 (latest)
just test out the amplifier until you get the right amount of hearts you want regenerated.
Yup
use .setHealth
that's a thing?
idk what that is but I know you can use this
let hp = Entity.getComponent('minecraft:health')
hp.setCurrentValue( hp.currentValue + Healammount)
oh sorry I meant setCurrentValue old name was setHealth
ignore that
Lol I figured but I wasn't sure if there was a new way
lmao
how would you give more health tho
Thanks
What do you mean like max?
nvm
messed around with your script, this does work too
Yea i took it from one of my scripts
really no difference between the instant health method, but it is better to deal with amount values and not to guess off of amplifier values
thank you, you helped me too, I was wondering how to heal through script.
Well yea but also you can also just set it aswell
oh I know, I was actually messing with that before I stumbled upon this post