Jump to content

How do I add perks to a character?


Recommended Posts

I still can't really understand how to do it. Ok I know how to change how strong, fast

or how fast their hunger drains, but I don't really know how to add these that I planned:

Sanity drains when it rains, can cook food quicker than others.

Could someone here help me with these?

Thats actually the only thing I'm really struggling with at the moment.

Link to comment
Share on other sites

For the rain you can try this one

local function onisraining(inst, israining)
    if TheWorld.state.israining then
    inst.components.sanity:DoDelta(-3, 3)
    end
end

local master_postinit = function(inst) --reference on where it goes

inst:DoPeriodicTask(3, onisraining, nil, inst)

and mastercode

this must work. I don't know the details but if there is any problem let me know.

Edited by AkaiNight
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
 Share

×
×
  • Create New...