How do I settle a bug about space input ?

Get help using Construct 2

Post » Wed Mar 15, 2017 11:43 pm

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.
B
5
S
1
Posts: 30
Reputation: 441

Post » Thu Mar 16, 2017 12:38 am

Image
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.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Thu Mar 16, 2017 1:56 am

Works perfectly fine, thanks!
B
5
S
1
Posts: 30
Reputation: 441


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 28 guests