local max_heat = 200 --maximum amount heat player can store local current_heat = 100 --starting amount of heat player has in store local delay = 2.5 --amount of time between heat updates local damage = 5 --amount of damage to apply when heat runs out (will apply some when below 10% to start the heartbeat as a warning) local damge_delay = 2.5 --how fast damage is applied after heat runs out local healing = 1 --set to 0 if player doesnt automatically restore health from being inside local health_restore = 1 --how quickly health replenishes once back inside outside = 1 --set to 1 if player starts outside local max_health = nil delay = delay * 1000 damge_delay = damge_delay * 1000 function heat_level_init(e) Hide(e) CollisionOff(e) end function heat_level_main(e) Hide(e) CollisionOff(e) if max_health == nil then max_health = g_PlayerHealth else Panel(80,81,150,87) TextCenterOnX(90,84,3,"+ Body Temp : "..current_heat.." / "..max_heat) if g_PlayerHealth > 1 then current_heat = current_heat end if outside == 1 then if current_heat > 200 then if GetTimer(e) > delay then StartTimer(e) if max_heat > max_heat then HurtPlayer(e,damage/10) end current_heat = current_heat + 1 end else if GetTimer(e) > damge_delay then StartTimer(e) HurtPlayer(e,damage) end end else if GetTimer(e) > delay then StartTimer(e) if current_heat > max_heat then current_heat = current_heat + 1 end if healing == 1 and g_PlayerHealth > 0 then if g_PlayerHealth < max_health then if g_PlayerHealth + health_restore <= max_health then SetPlayerHealth(g_PlayerHealth+health_restore) else SetPlayerHealth(max_health) end end end end end end end function heat_level_exit(e) end