FurryEskimo Posted July 21, 2020 Share Posted July 21, 2020 (edited) Is there a way to change how much damage a character takes from overheating/freezing? I've heard there's also a way to change the temperature at which these statuses take effect. I imagine the code will go into the "local master_postinit = function(inst)" furryeskimo.lua Edited July 21, 2020 by FurryEskimo Link to comment https://forums.kleientertainment.com/forums/topic/120303-weakness-to-overheating-resistance-to-freezing/ Share on other sites More sharing options...
Ultroman Posted July 21, 2020 Share Posted July 21, 2020 In the temperature component you can see these functions. These set the amount of health removed from the entity when freezing (hurtrate) and overheating (overheathurtrate). When overheathurtrate is nil, it instead uses the hurtrate for overheating, as well. function Temperature:SetFreezingHurtRate(rate) self.hurtrate = rate end function Temperature:SetOverheatHurtRate(rate) self.overheathurtrate = rate end Link to comment https://forums.kleientertainment.com/forums/topic/120303-weakness-to-overheating-resistance-to-freezing/#findComment-1356353 Share on other sites More sharing options...
FurryEskimo Posted July 22, 2020 Author Share Posted July 22, 2020 Wonderful, thank you! I dropped this into the master_postinit and it worked out just fine. inst.components.temperature:SetFreezingHurtRate(0.25) inst.components.freezable:SetResistance(2) Not totally sure if the freeze resistance is at 200%, but probably. It's hard to test The character plays a lot differently than I'd been expecting. There are lots of benefits to using exclusively endothermic fires, but suddenly the character can't cook their own food. Link to comment https://forums.kleientertainment.com/forums/topic/120303-weakness-to-overheating-resistance-to-freezing/#findComment-1356491 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