Jump to content

Recommended Posts

Hi, I'm working on tweaking the Charlie mod to have a sanity perk when Maxwell, the playable character, is nearby. How exactly would I go about this? I'm very new to modding.. Charlie has a sanity drain of -1.25/min, and I would like to offset that with Maxwell nearby at +2.25/min for a net gain of +1. The radius should be small, like that of Glommer.

Thank you so much in advance for the help. ;v;

AddPrefabPostInit("waxwell", function(inst)	inst:AddComponent("sanityaura")	inst.components.sanityaura.aurafn = function(inst, observer)		if observer and (observer.prefab == "Charlie") then			return 0.05		end		return 0	endend)

Unfortunately, this appears to result in a crash.. D:

 

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