shirusnake Posted October 23, 2017 Share Posted October 23, 2017 Hi, I'm trying to make a character mod with a character who transforms. I've figured out how to set the character to transform while having 0 sanity (thanks to the forums here), and I would like to enact a health drain effect on her while she is transformed. However, I can't quite figure it out, and I can't find any examples to follow here. Any help is greatly appreciated! Here is my code. Right now it just kills me upon transforming. local function becomesabirust(inst) inst.rust = true inst.AnimState:SetBuild("sabirust") inst.Transform:SetScale(1, 1, 1) inst.components.combat.damagemultiplier = 2.5 inst.components.health:SetAbsorptionAmount(0.5) inst:AddTag("monster") if inst.components.health.currenthealth > 1 then inst.components.health:DoDelta(-1 * inst.components.health.currenthealth) end end Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now