Jump to content

Recommended Posts

Hello and i'm again. :/ I need your help again... When i try to edit my character it's crashes.

 

I'am using this codes:

 

Quote

local function oneat(inst, food)

    if food and food.components.edible and food.prefab == "fish" then
        
       GetPlayer().components.sanity:DoDelta(+50),
       GetPlayer().components.health:DoDelta(+15)
    end
    
end

this one for

-when she eats fish, she restores 50 sanity and 15 healt. But it's not working i put it azura.lua

 

Quote

inst:ListenForEvent("nighttime", function(world, data)
               -- test for moonphase
               if [full_moon] then
                    -- change things accordingly here
                        inst.components.locomotor.walkspeed = 2
                        inst.components.locomotor.runspeed = 3
                    inst.components.sanity.dapperness = TUNING.DAPPERNESS_SMALL
               end
end, GetWorld())

-- Reset all at day
inst:ListenForEvent("daytime", function(world, data)
               inst.components.sanity.dapperness = 0
end, GetWorld())

this one for

-at the full moon she loses 2x sanity and slows 0.5x

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