Gamepad Bug

Bugs will be moved here once resolved.

Post » Tue Jan 19, 2016 9:21 pm

Problem Description
____ A concise description of your problem here ____
In this example, if you jump using the keyboard, the boolean jump is set correctly and also the player jumps. If you use a gamepad, the player jumps but the boolean is not set to jump

Attach a Capx
____ Upload a Capx to this post ____
https ://drive.google.com/open?id=0Byu9Y6SIpi1LNjhmdHltZE1lMjg
Description of Capx
____ Concise description of what this CapX does ____
If you press "W" the player jumps and the boolean "jump" is set to true. Same should happen if you press "A" on the gamepad
Steps to Reproduce Bug
  • Step 1
  • Step 2
  • Step 3 etc.

Observed Result
____ What happens? ____
Jump boolean is not set to true
Expected Result
____ What do you expect to happen? ____
Jump boolean should be set to true
Affected Browsers
  • Chrome: (YES/NO)YES
  • FireFox: (YES/NO)YES
  • Internet Explorer: (YES/NO)YES

Operating System and Service Pack
____ Your operating system and service pack ____
Windows 8.1
Construct 2 Version ID
____ Exact version ID of Construct 2 you're using ____
216
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Wed Jan 20, 2016 12:45 pm

Closing as won't fix. The "On gamepad button pressed" trigger runs at a different time to the other conditions (due to the way the engine and underlying API works). When the gamepad button trigger event runs, it is immediately followed by the next event, which sets the "jump" variable to false again. The difference is whether the platform behavior gets to tick between the "simulate jump" action and the next event, which causes it to lift off the floor and makes "Platform is on floor" false.

The "jump" flag is pointless anyway - it seems to try to do the same thing as the built-in "Is on floor" condition, which always correctly indicates the "jump" state even when using gamepad input.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Wed Jan 20, 2016 2:05 pm

Ok, so there is no way to do it with a gamepad?
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Wed Jan 20, 2016 9:59 pm

Why do you even need to solve this? Can't you just use the "is on floor" condition?
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests