Hiru315 Posted November 10, 2020 Share Posted November 10, 2020 (edited) So I'm making a summoned item like Maxwell's shadow book. But it costs maxHealth instead of maxSanity. Found nothing inside the CodexUmbra's lua. But I think Meat Effigy's lua ""resurrectionstatue"" might be helpful. though I can't yet resurrectionstatue.lua Edited November 10, 2020 by Hiru315 Link to comment Share on other sites More sharing options...
Thomas Die Posted November 10, 2020 Share Posted November 10, 2020 inst.components.health:DeltaPenalty(percentage_as_a_decimal) 1 Link to comment Share on other sites More sharing options...
Hiru315 Posted November 10, 2020 Author Share Posted November 10, 2020 it worked. Thank u Link to comment Share on other sites More sharing options...
Thomas Die Posted November 10, 2020 Share Posted November 10, 2020 What beutoful little boys Link to comment Share on other sites More sharing options...
Hiru315 Posted November 10, 2020 Author Share Posted November 10, 2020 It's still template from Yakuzashi lol Btw how about the code to get back the maxHealth if they die? Link to comment Share on other sites More sharing options...
AndRay Posted November 10, 2020 Share Posted November 10, 2020 If I'm not mistaken, Delta accepts negative numbers as well. 1 Link to comment Share on other sites More sharing options...
Thomas Die Posted November 10, 2020 Share Posted November 10, 2020 function Health:DeltaPenalty(delta) self:SetPenalty(self.penalty + delta) self:ForceUpdateHUD(false) --handles capping health at max with penalty end Yes when you use a negative it should remove that amount. 1 Link to comment 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