0 Favourites

How do I settle a bug about space input ?

  • Hello !

    I have a bug about my space input.

    There is the capx : drive.google.com/open?id=0B6phdwDtsxJkTHlvdzFjenZlWXM

    All it does is, moving a sprite from left or right at the beginning. And when you press "space" it is supposed to change the value to invert the horizontal moving.

    But, the first sub-event of space pressed is not taken.

    In the capx, if you press space while the sprite is moving to right it is supposed to go left, but it doesn't. If it is going to left and you press space it will go to right.

    If you invert the position of both event, it will hapen the same thing inverted. So the first event is just not taken by the system and i don't understand why.. :/

    If there is something I am doing wrong please tell me because i'm getting mad on this

    Things I have tried right now :

    • Testing on every thing I have (Chrome, firefox, even edge).
    • Building the project
    • Doing new project (like I have done for this capx)

    Regards.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Replace this condition (direction = -1) by the System Condition "Else".

    What's happening now, is that as soon as you are pressing space and direction is 1, direction is changed to -1.

    Then, the system moves to the above displayed condition, realizes that direction is now -1, triggers the condition and immediately changed direction back to 1.

    Using Else prevents this from happening.

  • Works perfectly fine, thanks!

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