Help, MoveTo is killing my momentum?

0 favourites
  • 6 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I have a basic top-down shooter with WASD controls. Inside it there is a 'player controller object' that moves the player sprites and other objects. There is also a 'jump target' object. When the 'player controller object' MoveTo the 'Jump Target' I must repress the WASD key to move. I would like this to be seamless.

    WASD is called with an 'Is Key Down' so I figured it would continue to give the appropriate input to the 8-Direction behavior.

  • I read your post about 10 times and still don't quite understand the problem.

    You are using MoveTo behavior to make a "jump" in a top-down view game, right? And during the jump you are disabling 8direction? And it's not re-enabled until you release and press WASD keys again?

    Could you post your project file or a screenshot of events?

  • Here is the current project folder

    https://odineye.itch.io/zeroforce-a

    A demo of there bug. Everything seems to work fine, except I have to release and press the move keys after the jump is finished.

    Here is a gif of the code

  • Your WASD controls are trying to move the player before the MoveTo is finished. So MoveTo and 8direction behaviors are fighting each other. You need to add a condition "Player MoveTo Is NOT moving" to WASD events. And also use that condition in your Jump event, because the way you are checking "jumping" boolean variable is wrong, and the jump is also buggy.

  • Thank you. I knew there was a conflict in input but I couldn't figure out exactly what. I was actually using that Xbool above WASD but I can see how the initialization is different to the behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • SOLVED!

    Sry forgot to put that in.

    (do we have to do that here?)

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