I can dodge right but not left ?_?

Get help using Construct 2

Post » Thu May 22, 2014 6:03 am

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

[url][/url]
You do not have the required permissions to view the files attached to this post.
B
6
Posts: 25
Reputation: 300

Post » Thu May 22, 2014 2:56 pm

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.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Thu May 22, 2014 3:16 pm

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

Capture.PNG


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.
You do not have the required permissions to view the files attached to this post.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Thu May 22, 2014 8:50 pm

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

Capture.PNG


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
B
6
Posts: 25
Reputation: 300

Post » Thu May 22, 2014 10:04 pm

your project is on another version you might want to update it
B
6
S
1
Posts: 2
Reputation: 665

Post » Thu May 22, 2014 11:23 pm

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.
You do not have the required permissions to view the files attached to this post.
Last edited by FragFather on Fri May 23, 2014 2:25 pm, edited 1 time in total.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Fri May 23, 2014 1:23 am

Thnx for the help everyone, ill try it out when i get home tonite
B
6
Posts: 25
Reputation: 300


Return to How do I....?

Who is online

Users browsing this forum: Klarner and 21 guests