Jump to content

Problem with my mod

Recommended Posts

Ok so i wanted to make my character to have a negative sanity aura and it kinda works? except my character also gets negative sanity which i don't really want
Also i wanted that if i wear a garland sanity aura will be equal zero but my character gets negative sanity

Here is my sanity aura code


    inst:DoPeriodicTask(60.0, function(inst)
        if inst.components.sanity and inst:HasTag("playerghost") then
        local x,y,z = inst.Transform:GetWorldPosition()

        local players = TheSim:FindEntities(x, y, z, 5, {"player"}, {"playerghost", "INLIMBO"}, nil)
        for _,v in ipairs(players) do
            if v.components.sanity then

I just started making my character and I'm not really good at LUA coding so sorry if i look dumb


Link to comment
Share on other sites

13 hours ago, fixerhere said:

TheSim:FindEntities(x, y, z, 5, {"player"}, {"playerghost", "INLIMBO"}, nil)

Add the players tagg next to playerghost and INLIMBO if you want only the character to not get it 

ifyou want everyone else to get it do


"If v ~= inst then"

Then should make it so that if it finds you then it should work 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Ok i think i found something but i'm not sure if it's right
Tagg is called "healingflower" but it's in the hats_lavaarena prefab so it's probably wrong 

Also i don't know if i'm blind but i don't see garland onequip?

Only garland code i saw is this one


    local function flower_custom_init(inst)

    local function flower()
        local inst = simple(flower_custom_init)


        if not TheWorld.ismastersim then
            return inst

        inst.components.equippable.dapperness = TUNING.DAPPERNESS_TINY



        return inst



Edited by fixerhere
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

  • Create New...