game controller problems

Non-platform specific questions.

game controller problems

Postby pikapika » Fri Oct 14, 2011 8:48 pm

i alreaready can use the joystick on my gamepad no problem but when i tried hblades code for the buttons none of them worked. i want to make it so that when i press a button on the controller that an event is activated such as create actor. i havent had any luck doing this so far no matter how many codes i try. i have a controller where the buttons are number 1 through 11 if that effects the code for it. please post an answer soon in the box below
pikapika
 
Posts: 10
Joined: Wed Oct 12, 2011 12:06 am
Score: 0 Give a positive score

Re: game controller problems

Postby Hblade » Fri Oct 14, 2011 10:48 pm

Using my code still, try this:
Code: Select all
if (BTN[0]==1) {
//create actor
}
if (BTN[1]==1) {
//Something else
}
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: game controller problems

Postby pikapika » Fri Oct 14, 2011 11:28 pm

this code did not work maybe its because my controller has no button 0. the code went in without an error message but when i went into game mode i pressed the buttons and nothing happend. i tried it a few times and know luck. do you know what im doing wrong. please post an answer.
pikapika
 
Posts: 10
Joined: Wed Oct 12, 2011 12:06 am
Score: 0 Give a positive score

Re: game controller problems

Postby Hblade » Sat Oct 15, 2011 3:30 am

Button[0] is actually Button1, but I suppose its worth a shot to change the values up.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: game controller problems

Postby pikapika » Sat Oct 15, 2011 7:11 am

i tried it using the new button numbers . when i went into game mode i could move my actor with the joystick but nothing happened when i pressed the buttons. is there anything else that i can try. please post an answer.
pikapika
 
Posts: 10
Joined: Wed Oct 12, 2011 12:06 am
Score: 0 Give a positive score

Re: game controller problems

Postby Hblade » Sat Oct 15, 2011 4:04 pm

I dont know :(
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest