Jump to content

Recommended Posts

Inside YOURCHARCTER.lua, inside master_postinit

inst:ListenForEvent("onattackother", function(inst, data) -- When ever you attack something you'll gain sanity
if not data.target:HasTag("veggie") and not data.target:HasTag("veggie") and not data.target:HasTag("structure") and not data.target:HasTag("wall") and not data.target:HasTag("companion") then -- Don't gain sanity if it isn't a living entity or chester
inst.components.sanity:DoDelta(.25) -- 25% of 1 point of sanity, change number to whatever you want
end
end)

 

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...