Forum rules - please read before posting.

Check movement/running state?

I'd like to set up an actionlist or playmaker FSM which drains a "stamina" variable while the player is running. There doesn't seem to be a way currently to "check" the movement state of player as far as I'm aware, and that would be all I would need to work this out. By that I mean I need to figure out a simple way of checking whether or not the player is moving at all. 

After that, I can just disable "double-click to run" and only toggle running via an actionlist, which can then set a variable and run another actionlist which subtracts stamina and loops, but only during movement.

Alternatively a "check movement" and "check walk/run" would be even more helpful as it would simplify the process as well as allow the double-click running method to remain.

Has anyone found a way to do either of these things? Any ideas? Thanks!

Comments

  • The "charState" enum on Players and NPCs changes between Idle, Move, and Decelerate when moving.  You can read it with:

    AC.KickStarter.player.charState

    And a boolean check for whether the player is running:

    AC.KickStarter.player.isRunning
  • Thanks, I'll see if I can work with that!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!