SOLVED XBOX Controller X Y B Button Mapping

Get help using Construct 2

Post » Sun Dec 15, 2013 12:13 pm

Hi Guys,

My name is Keith and I am a Sergeant in the British Army. I own a small game studio called AppChogie Games. I have been developing games for PC/MAC and mobile for 20 years.

I have recently came across C2 and absolutely love it. I have decided to build a game called Undead Fred that I first started on iOS but never finished due to deployment to Afghanistan. I have all the assets so it seemed a good place to go start, I have been using C2 for two days now and already I have the game about 20% completed. (I will post a video etc soon)

I have decided to set up Undead Fred for touch, keyboard and XBOX 360 controller. All work perfect with regards to keyboard and touch, but when I try to map the XBOX controller X button to a animation change it dosent work. I have mapped analogue left / right and A button using the "simulate platform" feature and they work perfect.

Any ideas? I have been looking in the manual, forum and internet. The code seems logical but it does not work. At best I have made the X button start the 1st frame of the attack animation.

Lastly I have tried the XBOX controller test site that another user created and it all works perfect.

Thanks for any help

Keithappchogie2013-12-17 10:30:04
B
6
Posts: 13
Reputation: 376

Post » Sun Dec 15, 2013 3:25 pm

I still cant find away of getting the other buttons (X, Y, B) mapped correctly apart from the "Simulated" L/R and A.

I have played other people's games on the Arcade that have it working?

Please point me in the right direction.

Thank you

Keith
B
6
Posts: 13
Reputation: 376

Post » Mon Dec 16, 2013 1:12 pm

Update:

I have updated to the new beta build this morning.

So after alot of trial and error trying different ways to trick the buttons, I made a diagnostic live event sheet for the XBOX 360 wired controller. This enabled me to see if in fact the gamepad buttons were accepting the button presses even tho nothing is happening on screen.

The short answer is YES they are working, so that in mind I tried the normal code again.

Gamepad: Gamepad 0 Button X is down: Fred : Set Animation to "FredStrike" (Play from begining)

With this method the gamepad reacts on the X button however only plays the 1st frame of animation again?

Has anyone got a working file that could help me with this. I have emailed the C2 devs and hope this is an error as it is driving me mad!

Thanks

Keithappchogie2013-12-16 13:13:30
B
6
Posts: 13
Reputation: 376

Post » Mon Dec 16, 2013 2:22 pm

Just a shot in the dark here, but maybe if instead of using 'X button is down', could you use 'On X button pressed'?
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Mon Dec 16, 2013 2:28 pm

@dpyellow thanks for the reply. I have tried that mate with no luck.

Thanks

Keith
B
6
Posts: 13
Reputation: 376

Post » Mon Dec 16, 2013 2:52 pm

Try this. If it doesn't work for you then it's an issue with your controller. If it does then clone it to work with your sprites.

http://www.dennisburch.info/gamepadanimationtest.capx
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Mon Dec 16, 2013 4:04 pm

@Burvey,

Thanks for taking the time to look at this for me, however your example is the way I originally coded it.

Your example does work with my gamepad, but for some reason not in my game?

Thanks

Keith
B
6
Posts: 13
Reputation: 376

Post » Mon Dec 16, 2013 4:48 pm

SOLVED!!

It is due to the restriction of triggers on the free edition. With keyboard, touch and joypad I am using too many. If I disable some other it works.

The fix is for me to purchase a licence! lol

Thanks for all the help.
B
6
Posts: 13
Reputation: 376

Post » Mon Dec 16, 2013 4:48 pm

Most likely some of your settings in construct 2 are incorrect. Can you post a capx?
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,986

Post » Mon Dec 16, 2013 5:15 pm

@Burvey please message me your email and ill send you the file via dropbox. I don't really want everyone having it.
B
6
Posts: 13
Reputation: 376

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests