NikMik Posted December 11, 2013 Share Posted December 11, 2013 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. Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/ Share on other sites More sharing options...
Rosten Posted December 11, 2013 Share Posted December 11, 2013 Maybe make it where he is being constantly heated by 1 so as to maintain his temperature below 0 without effecting the game to much? Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/#findComment-387780 Share on other sites More sharing options...
NikMik Posted December 11, 2013 Author Share Posted December 11, 2013 But when his temperature is over 0 he begins to melt. Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/#findComment-387781 Share on other sites More sharing options...
squeek Posted December 11, 2013 Share Posted December 11, 2013 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 Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/#findComment-387845 Share on other sites More sharing options...
NikMik Posted December 11, 2013 Author Share Posted December 11, 2013 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 ) endendIt works perfectly. Thank you very much! Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/#findComment-387949 Share on other sites More sharing options...
Rosten Posted December 12, 2013 Share Posted December 12, 2013 Hey, whats that mod you use that shows the health bar Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/#findComment-388015 Share on other sites More sharing options...
NikMik Posted December 12, 2013 Author Share Posted December 12, 2013 Hey, whats that mod you use that shows the health barhttp://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. Link to comment https://forums.kleientertainment.com/forums/topic/30335-disabling-the-red-on-the-screen-when-freezing/#findComment-388019 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