Jump to content

Recommended Posts

Every character uses the base Wilson stategraph (SGWilson) by default. It sounds like you're somehow managing to create a reference to SGWilson and then completely overwriting the ActionHandler for ACTIONS.PICK, which then affects every other character which uses the stategraph.

There's no need to go crazy with modifying stategraphs, though, since the existing ActionHandler already has the functionality you need.

        function(inst, action)
            return action.target ~= nil
                and action.target.components.pickable ~= nil
                and (   (action.target.components.pickable.jostlepick and "dojostleaction") or
                        (action.target.components.pickable.quickpick and "doshortaction") or
                        (inst:HasTag("fastpicker") and "doshortaction") or
                        (inst:HasTag("quagmire_fasthands") and "domediumaction") or
                        "dolongaction"  )
                or nil

What this ActionHandler does is it takes your instruction - in this case, a PICK action - and returns the appropriate animation state depending on various factors.

All you need to do is add either the "fastpicker" tag to your character prefab to make all picking actions take minimal time (think carrots), or the "quagmire_fasthands" tag to have your character harvest quickly but not instantly.

Edited by ShinyMoogle
Link to comment
Share on other sites

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