jtkirby Posted July 17, 2015 Share Posted July 17, 2015 Hello! I am trying to make a custom character, but I am running into a problem which is I want them to be completely resistant to the cold, but over heat faster and take increased damage from overheating. If you know how to do this please tell me, and thank you in advance. Link to comment https://forums.kleientertainment.com/forums/topic/56230-help-with-freeze-resist-and-more-damage-from-heat-for-custom-character/ Share on other sites More sharing options...
Blueberrys Posted July 17, 2015 Share Posted July 17, 2015 @jtkirbyFreezing disable:-- When freezing (below 0)inst:ListenForEvent("startfreezing", function(inst, data) -- Set back to 0 inst.components.temperature:SetTemperature(0)end)Heat damage:inst:ListenForEvent("healthdelta", function(inst, data) if (data.cause == "hot") then -- When hurt by heat inst.components.health:DoDelta(-1) -- Do more damage endend) Link to comment https://forums.kleientertainment.com/forums/topic/56230-help-with-freeze-resist-and-more-damage-from-heat-for-custom-character/#findComment-655115 Share on other sites More sharing options...
jtkirby Posted July 17, 2015 Author Share Posted July 17, 2015 @Blueberrys,Thanks for this, the problem is that I am new to modding Don't Starve and I don't know what file to put this code in and where to put it.@Blueberrys,Thanks for this, the problem is that I am new to modding Don't Starve and I don't know what file to put this code in and where to put it. Link to comment https://forums.kleientertainment.com/forums/topic/56230-help-with-freeze-resist-and-more-damage-from-heat-for-custom-character/#findComment-655196 Share on other sites More sharing options...
Finerlobster Posted July 17, 2015 Share Posted July 17, 2015 I don't know what file to put this code in and where to put it. Put it in your character file: local fn = function(inst) --codeend Link to comment https://forums.kleientertainment.com/forums/topic/56230-help-with-freeze-resist-and-more-damage-from-heat-for-custom-character/#findComment-655284 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