Something wrong with the controls? (Test game added)

Get help using Construct 2

Post » Thu May 29, 2014 9:57 pm

https://dl.dropboxusercontent.com/u/152 ... index.html

The running works fine, however when the left and right keys are rapidly pressed, the idle animation is moving instead. How can I fix this?
Image
B
7
Posts: 17
Reputation: 346

Post » Thu May 29, 2014 11:36 pm

When you release Left or right, it goes into stand (events 6 and 8), no matter if a key is currently down or not (since it is not pressed at this particular moment, it is just down so 7 and 9 aren't countering that)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri May 30, 2014 12:53 am

Aphrodite wrote:When you release Left or right, it goes into stand (events 6 and 8), no matter if a key is currently down or not (since it is not pressed at this particular moment, it is just down so 7 and 9 aren't countering that)


Is there another way to set the stand animation once the left and right keys are released?
B
7
Posts: 17
Reputation: 346

Post » Fri May 30, 2014 1:08 am

In event 7 and 9:

I think remplacing the "is pressed" with "key is down", and also change the "play from beginning" with "play from current frame" could do the trick, you could also test if the right key is not down in event 6, and that the left key is not down in event 7 (to do this, you have to add the condition Key is down, then you right click on it, and you use Invert)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri May 30, 2014 1:46 am

Yes it worked, thank you for your time and advice. I'll note this one.
B
7
Posts: 17
Reputation: 346


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests