How do I test if an object is moving or if analog sticks on a gamepad are not being used?

0 favourites
  • 3 posts
From the Asset Store
Everything you need to incorporate old school hip hop bangers.
  • Hello,

    I am trying to set up a gamepad for a top-down shooter and am having difficulty getting my walking animation to stop when the left analog stick is not being pressed. So far, I have it set where if the left analog stick is pushed in any direction it triggers the physical movement and sets a "walking" instance variable to true; which sets the walking animation, among other things in my code.

    I was thinking that the best way to set the "walking" instance variable to false would be to test if the player is moving -- if not moving, set it to false and the rest of my code should work.

    Is this a good way to do this or is there a better way to test if the analog sticks are not being used? I appreciate your assistance.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • to know when the analog sticks are no longer being touched:

    this will trigger once to tell you when the controls have been released

    this is left/right for the left stick. so you may need to add more depending on your control scheme

  • Thank you! I will give this a try.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)