What am I doing wrong?

0 favourites
  • 3 posts
From the Asset Store
Be quick and choose whether the shown equation is right or wrong.
  • I have created a character that can do the basic movements of walk left and right, jump, and crouch.

    I then wanted something more complex. When he draws his gun, he walks left and right WITH THE GUN DRAWN.

    On the attached screenshot of my Event Sheet you'll see how I have tried to achieve this, and for the most part it all works. Except for one thing -- when the character walks with gun drawn, he'll keep on walking infinitely (even when the arrow key and "gun draw key" (command, in this case) is no longer being pressed.

    I'm assuming I've left a conflict open somewhere but I can't seem to locate it. Can anyone see where I've gone wrong?

    Thanks in advance for your help!

  • By continues to walk infinitely I assume you mean the player isn't moving but it's playing the walk animation? Why are your walk left and right conditions so different? Well the bottom event for idle is kind of redundant. Really the top one should overrule for idle but it may not trigger if the player is considered as moving for some reason or the player is not considered to be on the floor, you can debug it and check.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you can simplify your events to have more dependencies, rather than a series of individual events.

    If you use what arrow key is being held down as the main condition, you can modify the actions a little easier.

    For example, below, you can see if the right arrow is being held down, we first check if the command key is held down, and then set the animation accordingly.

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