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 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 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 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.