Jump to content

Recommended Posts

Hello again! My upcoming character is immune to the cold, but the screen still goes red when his temperature is below 0. Is there any way I can make that not happen? 

 

If I wait until his temperature drops below 0, leave the game, and then go back into it, the red screen will temporarily be gone. I used this to show what I want it to be like.

 

post-286034-0-63345300-1386776931_thumb.

The red overlay can be found in scripts/widgets/bloodover.lua. It is triggered by the event "startfreezing" (pushed by the 'temperature' component), which is listened for by PlayerHUD (line 194 of scripts/screens/playerhud.lua)

Untested, but this should work:

-- if in modmain, this is neededlocal require = GLOBAL.requirelocal BloodOver = require "widgets/bloodover"-- save the original function (or a dummy function as a fail-safe)local BloodOver_UpdateState_base = BloodOver.UpdateState or function() endfunction BloodOver:UpdateState()	if self.owner.prefab == "yourcharprefab" then		-- only turn on if starving; the base function also checks for freezing here		if self.owner.components.hunger:IsStarving() then			self:TurnOn()		else			self:TurnOff()		end	else		BloodOver_UpdateState_base( self )	endend

The red overlay can be found in scripts/widgets/bloodover.lua. It is triggered by the event "startfreezing" (pushed by the 'temperature' component), which is listened for by PlayerHUD (line 194 of scripts/screens/playerhud.lua)

Untested, but this should work:

 

-- if in modmain, this is neededlocal require = GLOBAL.requirelocal BloodOver = require "widgets/bloodover"-- save the original function (or a dummy function as a fail-safe)local BloodOver_UpdateState_base = BloodOver.UpdateState or function() endfunction BloodOver:UpdateState()	if self.owner.prefab == "yourcharprefab" then		-- only turn on if starving; the base function also checks for freezing here		if self.owner.components.hunger:IsStarving() then			self:TurnOn()		else			self:TurnOff()		end	else		BloodOver_UpdateState_base( self )	endend

It works perfectly. Thank you very much!

Hey, whats that mod you use that shows the health bar

http://forums.kleientertainment.com/files/file/271-futaradragon-dynamic-status-bar/

 

It's very handy. Especially with the William mod since it lets you see how much health his robots have left.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...