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
85
S
31
G
23
Posts: 384
Reputation: 19,092

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
85
S
31
G
23
Posts: 384
Reputation: 19,092

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
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

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
85
S
31
G
23
Posts: 384
Reputation: 19,092

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
68
S
8
G
6
Posts: 931
Reputation: 9,360

Post » Thu Aug 23, 2012 4:55 pm

I'm still waiting for the correct answer about this bug
B
85
S
31
G
23
Posts: 384
Reputation: 19,092

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
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests