Problem with Xbox Controller

For questions about using Classic.

Post » Sat Dec 29, 2012 12:35 am

Hello guys!

I'm trying to make a platformer game with both keyboard and xbox controller controls, but I'm having a little problem with the controller and with the simplest thing of all - jumping.
First of all I disabled deafult jump controls in application properties so everything is controlled by events, then I set jumping two ways. First in MouseKeyboard, on key pressed condition, which works fine - when certain button is pressed sprite is jumping at a given height and when I press and hold the button the sprite will jump only once. When it comes to xbox controller there is a problem because it can only have one condition - on control is down, which makes that the sprite is flying up constantly when certain button is pressed and hold.

So there is my question - is there any way to make xbox controller recognize only single button press even if the button is hold, like on key pressed condition?

Here is screenshot of my events because I can't post link to .cap file yet



Thanks in advance :)MrSheet2012-12-29 00:42:15
B
3
S
1
Posts: 7
Reputation: 583

Post » Sat Dec 29, 2012 12:49 am

Add a Trigger Once While True condition from the System object underneath "Button A" is down, should act the same as "is pressed" would for a keyboard control Jayjay2012-12-29 00:50:27
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Dec 29, 2012 1:26 am

That worked :)

Thanks a lot jayjay :)
B
3
S
1
Posts: 7
Reputation: 583

Post » Sat Dec 29, 2012 3:08 pm

Heck, I didn't even know you could use 'OR'. I thought I read that it was broken... but now that I think of it that was years ago and I guess I never looked into it again.

Nice to know that it can be used. Now I don't have to keep grouping all of my controls. It was creating some really long event sheets.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests