Jump to content

Custom character sanity perks


Recommended Posts

Hello, I'm currently trying to finish up a character mod I've been working on and I need a bit of help coding some custom sanity gains/drains for it. Some things I've been able to code myself (gaining sanity when he hits enemies, gaining sanity when he moves, draining it when he's still, so on), but there are a few things I can't really seem to code properly.

 

I want to make it so he gains sanity when he's hit, but I also want to nullify the sanity he gains by default when he picks flowers and unlocks recipes. For the flower thing, I've tried the few "AddPrefabPostInit" codes you put in the character's modmain.lua, but none of those seem to work for me. The other two I just can't really figure out.  :indecisiveness:

 

Any help would be greatly appreciated.  :-)

Link to comment
Share on other sites

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
 Share

×
  • Create New...