Pretty much I just want to make a companion healer who heals the player whenever their health drops below a certain amount.
So here is the script
scriptname healer extends actor
Actor Property Lean Auto
spell property Healother auto
Function Healplayer()
registerforUpdate(5)
endfunction
Event Onupdate()
int playersHealth = Game.GetPlayer().GetActorValue("health") as int
if playersHealth >75
Lean.EquipSpell(Healother, 1)
Healother.cast(self, Game.GetPlayer())
endif
endevent
I have not been able to get anything out of this script besides for it saving successfully...any help would be appreciated, in the mean time I am going to continue reading up on papyrus tutorials