. . . Posted October 22, 2019 Share Posted October 22, 2019 (edited) Hello, I need help with something I can't figure out myself So basically my character has very low freezing resistance like 1, but this seems to cause problems because when the character is frozen they can become frozen again basically being trapped in a frozen state until they die if they're hit from something like deerclops. So what I would like to do is make it the addcoldness function of the freezable state won't work if the entity is already frozen to prevent stuff from being stuck in frozen state forever . Thanks for reading and any help, have a great time ! Edited October 22, 2019 by Warbucks Link to comment Share on other sites More sharing options...
Jessie_ Posted October 23, 2019 Share Posted October 23, 2019 go to your character's prefab file, this should be in somewhere like prefabs/FluffyCakeChan.lua for example put this outside master_postinit (before it): local function AddColdness_override(self, ...) if self:IsFrozen() then return end self:AddColdness_original(...) end put this inside master_postinit (preferably at the end): local freezable = inst.components.freezable freezable.AddColdness_original = freezable.AddColdness freezable.AddColdness = AddColdness_override Link to comment Share on other sites More sharing options...
. . . Posted October 23, 2019 Author Share Posted October 23, 2019 Hmm, it seems even with the code stuff like deerclops can still freeze you forever if your resistance is low so probably it won't be that simple to fix... but thanks ! 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