AFS Co. Posted August 19, 2021 Share Posted August 19, 2021 I'm trying to add a functionality to the actionhandler for ACTIONS.EAT. But for the compatibility, I want to only append it. local function sgmod(self) local old_eat_state = self.actionhandlers.ACTIONS.EAT.deststate self.actionhandlers.ACTIONS.EAT.deststate = function(inst, action) local oldstate = old_eat_state(inst, action) if old_eat_state ~= nil and inst:HasTag("asdf") then return "throw" else return oldstate end end end AddStategraphPostInit("wilson", sgmod) AddStategraphPostInit("wilson_client", sgmod) How would I do it? Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now