Crestonia Posted January 19, 2015 Share Posted January 19, 2015 Does anyone what script I can use to make my custom character immune to cold? I was just wondering, since a new character I was making is supposed to be immune to the cold. Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/ Share on other sites More sharing options...
Ryuushu Posted January 19, 2015 Share Posted January 19, 2015 (edited) @Crestoniainst.components.temperature.mintemp = 20With this the minimum temperature your character will experience is 20 degrees, which is warm enough to prevent freezing (and should be cold enough to avoid overheating right away in RoG summer when it comes out). Edited January 19, 2015 by Ryuushu Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-603550 Share on other sites More sharing options...
Kzisor Posted January 19, 2015 Share Posted January 19, 2015 @Crestonia, try the following: if inst.components.freezable theninst:RemoveComponent("freezable")end This will only make you immune to freezing. Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-603557 Share on other sites More sharing options...
Crestonia Posted January 19, 2015 Author Share Posted January 19, 2015 @Crestonia, try the following: if inst.components.freezable theninst:RemoveComponent("freezable")end This will only make you immune to freezing.Should I put this under stats? Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-603561 Share on other sites More sharing options...
Crestonia Posted January 19, 2015 Author Share Posted January 19, 2015 @Crestoniainst.components.temperature.mintemp = 20With this the minimum temperature your character will experience is 20 degrees, which is warm enough to prevent freezing (and should be cold enough to avoid overheating right away in RoG summer when it comes out). Sorry I'm kind of new at modding. Should I just put it under the stats section? Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-603563 Share on other sites More sharing options...
Kzisor Posted January 19, 2015 Share Posted January 19, 2015 @Crestonia, it's used like this in the modmain.lua file. AddPrefabPostInit("CHARACTER PREFAB NAME HERE", function(inst) if inst.components.freezable then inst:RemoveComponent("freezable") endend) Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-603564 Share on other sites More sharing options...
Ryuushu Posted January 19, 2015 Share Posted January 19, 2015 (edited) @CrestoniaIt goes inside your character's master_postinit, like so:local master_postinit = function(inst) -- choose which sounds this character will play inst.soundsname = "willow" -- Stats inst.components.health:SetMaxHealth(150) inst.components.hunger:SetMax(150) inst.components.sanity:SetMax(200) inst.components.temperature.mintemp = 20endSo, yes, under your character stats/abilities section, if that's how you understand it. Edited January 19, 2015 by Ryuushu Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-603570 Share on other sites More sharing options...
MarshallMabee Posted April 26, 2015 Share Posted April 26, 2015 I want something similar to this, I want My character to not overheat in Reign of Giants when it is summer, what should I add to my master_inv? Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-632177 Share on other sites More sharing options...
DarkXero Posted April 26, 2015 Share Posted April 26, 2015 @MarshallMabee,inst.components.temperature.maxtemp = 60Overheating temp is 70. Link to comment https://forums.kleientertainment.com/forums/topic/49370-immunity-to-cold/#findComment-632214 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