Jump to content

Recommended Posts

I want to know how to give my custom character a sanity buff when she's in the graveyard biome, and how to give her a sanity decrease when she's around regular flowers, as well as a slight health decrease if she picks them or wears the flower crown. 

Thanks guys! I'm hopeless with coding!

For the graves and flower sanity, you should edit the respective prefabs "mound" and "flower" using a "AddPrefabPostInit" for each.

AddPrefabPostInit("flower", function(inst)
  inst.components.sanityaura.aura = -TUNING.SANITYAURA_SMALL
end)
AddPrefabPostInit("mound", function(inst)
  inst:AddComponent("sanityaura")
  inst.components.sanityaura.aura = TUNING.SANITYAURA_MED
end)

Thank you so much!

Where would I put that exactly? I've opened prefabs in the character's folder and the .lua file but all I see is a huge list of actions with their respective .zips.

Edited by cruelings

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