mexican geek Posted June 4, 2022 Share Posted June 4, 2022 Hey hey, I'm making a character and I'd be glad if yall could explain to me how the frost screen overlay that happens at 5 degrees or less works, how can I make it show using code? Link to comment Share on other sites More sharing options...
Wonderlarr Posted June 4, 2022 Share Posted June 4, 2022 I think you're looking for widgets/iceover.lua, that seems to handle the on screen freeze effect. Unfortunately it seems to be hard coded to only work based on temperature, there doesn't seem to be an easy way to arbitrarily call the effect. You'll need to create your own identical effect I believe. 1 Link to comment Share on other sites More sharing options...
mexican geek Posted June 5, 2022 Author Share Posted June 5, 2022 Huh, welp, any idea how I do that? Never replicated a whole effect... Link to comment Share on other sites More sharing options...
Ziro2k Posted June 6, 2022 Share Posted June 6, 2022 (edited) The iceover effect is just an image that is overlayed on top of the whole screen, with its transparency adjusted. You can easily make your own version by creating a new widget with this in its file (I called it mynewiceover.lua, can be whatever name you want): local Widget = require "widgets/widget" local Image = require "widgets/image" local MyNewIceOver = Class(Widget, function(self, owner) self.owner = owner Widget._ctor(self, "MyNewIceOver") self:SetClickable(false) self.img = self:AddChild(Image("images/fx.xml", "ice_over.tex")) self.img:SetEffect( "shaders/uifade.ksh" ) self.img:SetHAnchor(ANCHOR_MIDDLE) self.img:SetVAnchor(ANCHOR_MIDDLE) self.img:SetScaleMode(SCALEMODE_FILLSCREEN) end) return MyNewIceOver You'll need to add it as a child to the overlayroot of the playerhud as well. If you want to dynamically control its transparency, when it shows up, or play the associated freeze sound, etc. then you'll have to do that using net variables. As it stands this code should just give you a permanent iceover effect. If you need more details on how to do this, feel free to ask. Edited June 6, 2022 by Ziro2k 1 Link to comment Share on other sites More sharing options...
mexican geek Posted June 7, 2022 Author Share Posted June 7, 2022 (edited) On 6/6/2022 at 3:13 AM, Ziro2k said: You'll need to add it as a child to the overlayroot of the playerhud as well. If you want to dynamically control its transparency, when it shows up, or play the associated freeze sound, etc. then you'll have to do that using net variables. As it stands this code should just give you a permanent iceover effect. If you need more details on how to do this, feel free to ask. Thank you so so much for the help up until now, I'd be glad for an explanation on how to do these things... thanks in advance Edited June 10, 2022 by mexican geek Link to comment Share on other sites More sharing options...
mexican geek Posted August 6, 2022 Author Share Posted August 6, 2022 bumpin, help please Link to comment 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