rons0n Posted February 8, 2016 Share Posted February 8, 2016 So I tried making it so when my character has this specific tag that he loses no sanity whatsoever. Which means literally everything that has to do with sanity will not effect him. I asked a similar question when it came to HP healing nothing with a specific tag but i tried applying the same method with sanity with no avail. Maybe I'm just derping. How can I make my character lose no sanity no matter what while using a tag? Thanks! Link to comment Share on other sites More sharing options...
zUsername Posted February 8, 2016 Share Posted February 8, 2016 I think easiest way is overriding sanity component like this: local function nolosesanity(self) local _DoDelta = self.DoDelta self.DoDelta = function(self, delta, overtime) if self.inst:HasTag("yourtag") then return end return _DoDelta(self, delta, overtime) end end AddComponentPostInit("sanity", nolosesanity) Link to comment Share on other sites More sharing options...
rons0n Posted February 8, 2016 Author Share Posted February 8, 2016 @zUsername, Thanks mate that got it to work! Will give ya a shoutout 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