Jump to content

Change sanity/insanity effects to a precise point instead of beeing calculated by %


Leocean

Recommended Posts

Hey, does somebody know how I can change sanity/insanity effects to be calculated by precise points instead of %. E. g. one of my modded character got a max.sanity of 250,but at 150 my screen already getting thouse typicall "insanity" effects i. g blurred borders and so on... 

 

So at the end it should be like this: Starting insanity effects at ~70 sanity points.

 

I tryed to google some solutions but couldnt find anything usefull, the only thing I did find, was this:

 

thread http://forums.kleientertainment.com/topic/33162-mod-help-sanityinsanity-changing-health-and-hunger-stats/

Link to comment
Share on other sites

You can change insanity effects to be active at a certain percent, but not a specific value. Correct?

 

If so, you can still pull off your sanity effects at a specific value. 70 / 250 = 0.28, so the insanity effects should become active at 28% in order for them to happen once your sanity reaches 70.

Link to comment
Share on other sites

First of all, thank you for responding :)

hm k, so how do I set this up? the only thing I have related to sanity is a "if sanity low function, -> toggle night vision"

 

 

 

local function sanitylow(inst, data)
 
if inst.components.sanity.current <= 40 then
inst.Light:Enable(false)
end
 
if inst.components.sanity.current > 110 then
inst.Light:Enable(true)

 

 

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