Monty_Droppings Posted July 26, 2014 Share Posted July 26, 2014 local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK]handle.deststate = function(inst) return "doshortaction" endI stumbled upon this line of code searching through old forum posts. It changes the animation of picking grass/twigs to the shorter animation of picking up an object off the ground. I am just wondering if someone could explain how this code does this, and if it could be reversed i.e. changing the picking up animation to the longer one of picking twigs/grass. Link to comment https://forums.kleientertainment.com/forums/topic/38910-explain-this-line-of-code/ Share on other sites More sharing options...
Mobbstar Posted July 26, 2014 Share Posted July 26, 2014 local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK]handle.deststate = function(inst) return "doshortaction" endI stumbled upon this line of code searching through old forum posts. It changes the animation of picking grass/twigs to the shorter animation of picking up an object off the ground. I am just wondering if someone could explain how this code does this, and if it could be reversed i.e. changing the picking up animation to the longer one of picking twigs/grass. "doshortaction" is a quick pickup-animation, "dolongaction" is the fiddley-faddley animation. You can't make it even longer using this method, I don't think.What I'd do: add a workable component, reset it to "2" every time regrown, requires you to harvest twice. You need moderate madhacking skills to do that. Link to comment https://forums.kleientertainment.com/forums/topic/38910-explain-this-line-of-code/#findComment-516234 Share on other sites More sharing options...
Monty_Droppings Posted July 26, 2014 Author Share Posted July 26, 2014 local handle = inst.sg.sg.actionhandlershandle.deststate Mostly curious what those two lines mean. The code I posted in the OP makes long actions (grass harvesting), get replaced by the short animation, I am trying to replace the short animation with the longer one. Link to comment https://forums.kleientertainment.com/forums/topic/38910-explain-this-line-of-code/#findComment-516236 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