Gravity increasing

Bugs will be moved here once resolved.

Post » Tue Aug 21, 2012 6:56 am

I think I found a bug!

Here is what I'm trying to do:

Keyboard | S is down > Player | Set Platform Gravity to -20
System | Else              > Player | Set Platform Gravity to 1500

Here is the thing, when I hold down the "S" key it does what it expected to do. The problem happens when I let it go the "S" key and press it again before the player land on the floor.
If I press it again before the player land on the floor, the Gravity increases 20 per time pressed.

Is it a bug or I'm not using the right logic?
B
89
S
32
G
23
Posts: 385
Reputation: 19,304

Post » Tue Aug 21, 2012 7:05 am

Have you tried..

Main Event Every Tick
Sub Event 1 S is Down - Set Platform Gravity to -20
Sub Event 2 Else - Set Platform Gravity to 1500
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Tue Aug 21, 2012 7:45 am

@Rory

The same problem happened. If I press the "S" key again, the gravity keep increasing. It's not supposed to do that.
B
89
S
32
G
23
Posts: 385
Reputation: 19,304

Post » Tue Aug 21, 2012 7:46 am

What about using the "While" event?

Sorry I'm just throwing out ideas, I don't have access to C2 at the moment so I can't try it out myself.Rory2012-08-21 07:50:03
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Tue Aug 21, 2012 2:17 pm

Please see how to report bugs, this report is missing your .capx file.
Scirra Founder
B
362
S
216
G
75
Posts: 23,064
Reputation: 180,315

Post » Tue Aug 21, 2012 5:29 pm

@Ashley Here is the .CAPX file.

http://dl.dropbox.com/u/89812940/construct2/gravity-bug.capxjogosgratispro2012-08-21 18:31:40
B
89
S
32
G
23
Posts: 385
Reputation: 19,304

Post » Tue Aug 21, 2012 10:56 pm

I had something like this... I resolved it by having the two different choices in their own groups, and when one is active the other is deactivated and vice versa.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
69
S
8
G
6
Posts: 933
Reputation: 9,389

Post » Thu Aug 23, 2012 4:55 pm

I'm still waiting for the correct answer about this bug
B
89
S
32
G
23
Posts: 385
Reputation: 19,304

Post » Thu Aug 23, 2012 6:07 pm

I don't think it's really a bug - when changing the gravity angle the player's fall speed is kept the same. So if you switch from strong gravity down, when the player is falling fast, to weak gravity upwards, the player is still falling fast but upwards.

Perhaps combine it with a 'set speed' action to control the speed when changing the gravity direction.
Scirra Founder
B
362
S
216
G
75
Posts: 23,064
Reputation: 180,315


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests