Jump to content

Help with Freeze Resist and More Damage from Heat for Custom Character


Recommended Posts

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

@jtkirby

Freezing 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

@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

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.

×
  • Create New...