Jump to content

Recommended Posts

woops, that's my bad. I totally thought there was some missing custom animations or something.

Okay then, back to the beginning. Did there used to be a point where he was visible? If you take out all his brains and stategraph and just do  inst.AnimState:PlayAnimation("idle_loop")  does anything show up?

alright, then it might be something in the stategraph. I would put some print fns on all of the important states onenter functions so that you can tell if it's going to the right state.

maybe for the Idle state, put  print("IDLE")  so you will be able to tell when they enter idle (if they even enter idle at all)

in-game, press Ctrl-L to bring up the screen that will show whatever gets printed out. if "IDLE" never appears on screen, then its never getting to the idle state

Maybe some of the PlayAnimation() functions have incorrect animation names set, so they just go invisible every time they enter that state.

Quote

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

this is how I change states from inside the spawn state?

Yea that's the right way to do it. But if no animation is playing when he enters the spawn state, then "animover" probably won't run (so he'll never go to the idle state).

In  inst.AnimState:PlayAnimation("spawn")  in your spawn state, does the "spawn" animation exist? In wilson's normal stategraph, I don't see any use of an animation called "spawn"

There's a chance that it exists, and just not used in the stategraph file itself, but try replacing that with a different animation name that you know exists. (like "idle_loop") and see if that fixes his ability to go to the idle state after spawning.

But that's just assuming that he's starting in the "spawn" state. If not, it's not going to change anything anyways

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