MrJerkbird Posted August 10, 2015 Share Posted August 10, 2015 Just trying to get my character's moisture level to set the current sanity level.The following doesn't seem to work: local function onmoistsanity(inst)--Current moisture as percentage local moistness = 100 * (GetMoisture(inst) / GetMaxMoisture(inst)) if moistness ~= 0 then inst.components.sanity.rate = 0 inst.components.sanity.rate_modifier = 0 inst.components.sanity:DoDelta(0) inst.components.sanity.current = moistness inst.components.temperature.current = 35 endend Link to comment Share on other sites More sharing options...
DarkXero Posted August 11, 2015 Share Posted August 11, 2015 @MrJerkbird:How are moisture and sanity related?I can't gather what you want to do from your function. If you are insane when you are not moist, then you are going to be insane 3/4 seasons. Seems pretty harsh.I can't imagine equating a 0 moisture value into a 0 sanity value. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now