How do I stop player moving on key release

Get help using Construct 2

Post » Sun Jan 08, 2017 3:56 pm

Whenever I use the platform behavior default controls or custom keyboard controls my character continue moving left/right even when I release the pressed key.

This happens regularly, it can be fine for a few seconds example pressing left will move the player left until I release the key but other times it continues moving left even when I let go of the key.

Any solution?
B
8
S
1
Posts: 17
Reputation: 634

Post » Sun Jan 08, 2017 4:07 pm

Take a screenshot of your events or upload the capx.....get better help.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sun Jan 08, 2017 4:16 pm

Its simply 2 sprites

Player sprite - Solid & Platform behavior with default controls
Floor sprite - Solid & Physics behavior made immovable

I run the project and I can control the player left, right and jump as intended. Problem is sometimes the player keeps moving in direction even when I stop pressing the key.
B
8
S
1
Posts: 17
Reputation: 634

Post » Sun Jan 08, 2017 4:32 pm

The player sprite doesn't need solid, just platform behaviour.
The floor doesn't need physics, just solid.
B
16
S
7
G
3
Posts: 395
Reputation: 3,693

Post » Sun Jan 08, 2017 4:40 pm

@mekonbekon

dang, i didn't even catch that. See what being up for 27hrs gets ya.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Wed Jan 11, 2017 4:30 pm

Message: maxrpg can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I'm still having this problem but I have now noticed that it only occurs when using the Microsoft Edge browser. BUT the problem still remains when testing on Windows Phone, maybe it uses Edge in the background or something to run the game?

I did some web searching and found a thread on fusions forum from someone having the exact same issue, obviously with different game dev software but same problem. He described it as keys not releasing when let go of them.

Here's another thread on html5gamedevs: https://goo.gl/jUolmz

I don't know what to do. I want to develop my games for Windows Phone but if it is having this issue of keyboard/touch controls having a mind of their own then no one will play my games because they're too glitchy.

Any thoughts on what may be causing this and possibly how to get around it?
B
8
S
1
Posts: 17
Reputation: 634


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 7 guests