I can dodge right but not left ?_?

0 favourites
  • 7 posts
From the Asset Store
A complete set of graphical user interface (GUI) to build 2D video games. With wood, nature, & jungle theme
  • Capx is attached

    For some reason, I can get my player character to dodge to the right normally, but not to the left. what I mean be normally is that I have it setup so when the block key is held down (in this case, S) and either A or D is tapped, the character will dodge to the respective direction, A for dodging to the left, D for dodging to the right.

    This works just fine when dodging to the right, but when I dodge left, if I release the A key during the dodge animation, my character resets into a standing idle animation. To prevent this I have it set up so letting go of the A or D key during dodging doesn't end it prematurely , and it works when I dodge right, but not left. Considering i have the same logic running for both dodging to the left and the right, I can't see why this is happening, I'm sure the answer is simple, but I can't figure, so help will be much appreciated

    Thanks in advance

  • I don't see the problem when I run the project on my system. What plugins are you using? What browser are you running the project in? Have you tried to clear your cache to make sure the project is not running a cached version?

    [Edit] On a Whim, I tested letting go of the S key, not the A key as you stated in your post. That resulted in the above problem. I am looking at it and will post what i find.

  • This is a simple 1 that would, in most cases, just take a second pair of eyes to diagnose. The issue is here:

    [attachment=0:3a7z9ttt][/attachment:3a7z9ttt]

    You are saying if S is let go and Dodge is not playing but, dodging left uses the Dodge2 animation, not the Dodge animation. You need to include Dodge2 is not playing.

    That should take care of your bug. Good luck with your project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a simple 1 that would, in most cases, just take a second pair of eyes to diagnose. The issue is here:

    [attachment=0:c820e3ki][/attachment:c820e3ki]

    You are saying if S is let go and Dodge is not playing but, dodging left uses the Dodge2 animation, not the Dodge animation. You need to include Dodge2 is not playing.

    That should take care of your bug. Good luck with your project.

    but here's the thing, when I alter that condition to apply to both Dodge and Dodge2, then I loose the ability to dodge normally in both directions instead of just one. And i've set it up in multiple ways

    the first was this

    Event: On S release

    sub event: is dodge animation playing OR is dodge2 animation playing (inverted)

    Action: same as before

    the second on was this

    Event: is dodge animation playing OR is dodge2 animation playing (inverted)

    sub event: On S release

    Action: same as before

    The third time I set up a seperate event that was the same as the first one, but with Dodge2 instead. all of these setups result in not being able to dodge normally in either direction, so im still at a loss at what im doing wrong

  • your project is on another version you might want to update it

  • In an effort to simplify things for you, I edited your project. Here are a couple things I noticed:

    1 - Because you are disabling some event groups, it would be better to remove all your events to set the character to idle from these groups.

    2 - You have events for letting go of the directions as well as the block so I combined those all into 1 event.

    3 - Because you want the idle to be happening when the 3 direction keys are not pressed, it would be best to use the inverted "is down" event, not the "on key released" event so I changed it to do that.

    4 - This has nothing to do with the above bug but, you had a couple "every tick" events combined with other conditions. "Every tick" does not change when an event happens when there are other conditions. In other words, if a condition is true, it will fire every tick without having "every tick" specified until it is no longer true. "Every Tick" should only be used if you really want something to happen every tick no matter what. There is a blog post about that but you'll have to look it up.

    There were a couple other things I changed but if you look over the project, you should see the differences.

  • Thnx for the help everyone, ill try it out when i get home tonite

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