Jump to content

Recommended Posts

local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK]handle.deststate = function(inst) return "doshortaction" end

I 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

local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK]handle.deststate = function(inst) return "doshortaction" end

I 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.

local handle = inst.sg.sg.actionhandlers
handle.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.

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...