Hitboo Posted November 17, 2016 Share Posted November 17, 2016 Im trying to create an item for a custom character. The item (for the begingn) ist planned as an live giving amulet but as passiv item like the eye bone. Can somebody help me with activating the death protection? the following bit is my current idea of how it could work but it dosent.Any Ideas qould be a help. Thanks local function healOwner(inst, owner) if owner.components.health and owner.components.health:IsHurt() then owner.components.health:DoDelta(5,false,"mapel") owner.components.hunger:DoDelta(5) end end local function taskTrigger(inst, owner) inst.task = inst:DoPeriodicTask(0.5, function() healOwner(inst, owner) end) end Link to comment https://forums.kleientertainment.com/forums/topic/71790-custom-item-death-protection/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now