0 Favourites

C2: bug on key released with 2 keys pressed

  • Hi Everybody,

    I just noticed that when I Press 2 keys And I released one , then the released animation is active and the player goes to the direction.

    Example:

    C2 example Space Blaster game

    Condition

    If you press Left And Right simultaneously and then release Right >>

    The space ship is going Left but with the Defaut animation and not the left animation.

    For this game difference is quite not visible but in platform you don't want the player to do some bizarre moonwalk and just slide on the ground.

    Tried on Chrome + Firefox

    Sorry if it has been said already

  • Hi me again,

    Just to say that to prevent the above issue you can just add the following condition

    Example

    On key released Right Arrow

    + On Key down Left Arrow   

    Then

    Set animation to PlayerLeftAnimation !

    As a consequence am not sure it is a bug but I am surprised Scirra left it in the Space blaster game (released on Chrome) so it's more a game bug

    Cheers :)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hi Ketoulou,

    I have the same issue that you describe in your first post.

    I tried your solution but does not work.

    Construct version: Release 126 (64bits)

    Steps:

    1) Press Right arrow

    2) Press Left arrow without release the Right key

    3) Release Left without release the Right key

    Then the player is going right but with the left animation.

    How can fix this behavior?

    Example dropbox.com/s/0er5oqvyuavk5kr/Test.capx

    Thank.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,798 322,009
yrokhlin's avatar
yrokhlin
Unread sticky
763 305,597
asikanddestroy's avatar
asikanddestroy
Unread hot topic
0 Favourites
Your C2 tests
566 243,714
thisisblogs's avatar
thisisblogs