Jump to content

making certain objects have a positive sanity aura


Recommended Posts

So I'm making a character mod in which the character generates sanity around certain objects and loses sanity around other certain objects. I've tried modifying others' scripts such as:

local function MakeGood(inst)     if inst and inst.components then            if not inst.components.sanityaura then inst:AddComponent("sanityaura") end            inst.components.sanityaura.aura = GLOBAL.TUNING.SANITYAURA_MED     endend AddPrefabPostInit("flower_evil", MakeGood)--AddPrefabPostInit("someotherprefab", MakeGood)-- add more prefabs here

function AddSanityAura(inst)	inst:AddComponent("sanityaura")    inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL end
-- AddPrefabPostInit("researchlab", AddSanityAura)-- AddPrefabPostInit("researchlab2", AddSanityAura)-- AddPrefabPostInit("researchlab3", AddSanityAura)

However, none of these appear to be working when I insert my own prefabs to have auras, . How would I go about this? If it helps, the objects I want to have a positive sanity aura are:

-golden boulder

-Marble pillars

-golden rock piles (shipwrecked)

And I would like these to have a negative sanity aura:

-beefalo/ water beefalo (shipwrecked)

-pigs/ wildbores (shipwrecked)

-splumonkeys/ prime apes (shipwrecked)

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...