Jump to content

"escape_end" is not reached in Abigail's Stategraph when using the Escape skill.


BushmannGG1392
  • Pending
    State {
        name = "escape",
        tags = { "busy", "noattack", "nointerrupt" },

        onenter = function(inst)
            inst.Physics:Stop()
            inst.AnimState:PlayAnimation("abigail_escape_pre")

            inst.components.health:SetInvincible(true)

            inst.Transform:SetTwoFaced() -- Abigail changes facings.
        end,

        events =
        {
            EventHandler("animover", function(inst)
                inst.sg:GoToState("run_start") -- Should be "escape_end".
            end),
        },

        onexit = function(inst)
            inst.components.health:SetInvincible(false)
        end,
    },

    State { --State is never reached due to the above issue.
        name = "escape_end",
        tags = { "busy", "noattack", "nointerrupt" },

        onenter = function(inst)
            inst.Physics:Stop()
            inst.AnimState:PlayAnimation("abigail_escape_pst")

            inst.components.health:SetInvincible(true)

            inst.Transform:SetNoFaced() -- Abigail restores facings to normal.
        end,

        events =
        {
            EventHandler("animover", function(inst)
                inst.sg:GoToState("run_start")
            end),
        },

        onexit = function(inst)
            inst.components.health:SetInvincible(false)
        end,
    },

Steps to Reproduce

Use the Escape skill and notice that after it ends, Abigail will snap to idle and have her facings be incorrect until restart.




User Feedback


There are no comments to display.



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