Dragonbot03 Posted November 10, 2021 Share Posted November 10, 2021 I'm very new to this with little to no knowledge of lua coding. I'm trying to make my first character mod and want them to be immune to winter. I have no idea how to go about this. I don't really care if they can be frozen by attacks or not, I just want them to be fine without a coat. Any and all help is greatly appreciated! Link to comment https://forums.kleientertainment.com/forums/topic/135181-solved-how-to-make-character-immune-to-cold/ Share on other sites More sharing options...
CarlZalph Posted November 10, 2021 Share Posted November 10, 2021 @Dragonbot03 Temperature is controlled with the temperature component. This resides on the server instance, so in your character's master postinit callback function you'd edit the component. It'd look something like: inst.components.temperature.mintemp = 10 Where 10 is just some arbitrary number above 0. The screen overlay effects start happening at temperature 5 with the sound effect. Characters start visibly shivering at temperatures below 0. So anything above 5 would work. 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/135181-solved-how-to-make-character-immune-to-cold/#findComment-1511937 Share on other sites More sharing options...
Dragonbot03 Posted November 10, 2021 Author Share Posted November 10, 2021 9 hours ago, CarlZalph said: @Dragonbot03 Temperature is controlled with the temperature component. This resides on the server instance, so in your character's master postinit callback function you'd edit the component. It'd look something like: inst.components.temperature.mintemp = 10 Where 10 is just some arbitrary number above 0. The screen overlay effects start happening at temperature 5 with the sound effect. Characters start visibly shivering at temperatures below 0. So anything above 5 would work. Y'know, that makes a lot of sense. It's working perfectly, thank you!! Link to comment https://forums.kleientertainment.com/forums/topic/135181-solved-how-to-make-character-immune-to-cold/#findComment-1512035 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