gvlego Posted October 20, 2015 Share Posted October 20, 2015 I'm trying to find a way to stop a character's sanity from being drain at dusk. So far I haven't found any ways to get this to work. Any suggestions? I'm rather new to modding, so forgive me if the solution is obvious. Link to comment https://forums.kleientertainment.com/forums/topic/58603-sanity-drain-at-dusk/ Share on other sites More sharing options...
Maris Posted October 20, 2015 Share Posted October 20, 2015 In character's prefab:inst.components.sanity.night_drain_mult = 0 Link to comment https://forums.kleientertainment.com/forums/topic/58603-sanity-drain-at-dusk/#findComment-681565 Share on other sites More sharing options...
gvlego Posted October 20, 2015 Author Share Posted October 20, 2015 I'm not trying to remove sanity drain altogether. I want to make so sanity does not drain at dusk but still drains at night. Link to comment https://forums.kleientertainment.com/forums/topic/58603-sanity-drain-at-dusk/#findComment-681598 Share on other sites More sharing options...
DarkXero Posted October 20, 2015 Share Posted October 20, 2015 inst:WatchWorldState("phase", function(inst, phase) if phase == "dusk" then inst.components.sanity.night_drain_mult = 0 else inst.components.sanity.night_drain_mult = 1 end end) Link to comment https://forums.kleientertainment.com/forums/topic/58603-sanity-drain-at-dusk/#findComment-681609 Share on other sites More sharing options...
Maris Posted October 20, 2015 Share Posted October 20, 2015 Yes, DarkXero right.Also on init:if TheWorld.state.isdusk then inst.components.sanity.night_drain_mult = 0end Link to comment https://forums.kleientertainment.com/forums/topic/58603-sanity-drain-at-dusk/#findComment-681627 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