Skip to main content
Also watch on these platforms:

If you want to change a players health in methods other than just the damage_per_second and minetest.item.eat this is for you.

Sorry the video cuts off kinda unexpectedly, I was going to show some other things, but it turned out they didn't work and I didn't want to record the video all over.

on_use = function(pos, player)
    local hp_gain = math.random(-4,1)
    local hp = player:get_hp()
    player:set_hp(hp + hp_gain)
end