Jump to content

Recommended Posts

I'm using a translator, so I might not be able to express my words properly. Please understand.

 

----

local function OnHealthDelta(inst, data)
    if data.amount < 0 then
        inst.components.sanity:DoDelta(data.amount * ((data ~= nil and data.overtime) and TUNING.WALTER_SANITY_DAMAGE_OVERTIME_RATE or TUNING.WALTER_SANITY_DAMAGE_RATE) * inst._sanity_damage_protection:Get())
    end
end

 

local function master_postinit(inst)

    inst:ListenForEvent("healthdelta", OnHealthDelta)

----

 

If my custom character's health is lost, I'd like to add a feature that loses mental strength by [0.5x]. I've tried putting Walter's abilities in, but there's no response. I keep looking it up in Klei, but I can't find it. I know very little about coding. Please someone let me know...

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...