Page 1 of 1

game controller problems

PostPosted: Fri Oct 14, 2011 8:48 pm
by pikapika
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

Re: game controller problems

PostPosted: Fri Oct 14, 2011 10:48 pm
by Hblade
Using my code still, try this:
Code: Select all
if (BTN[0]==1) {
//create actor
}
if (BTN[1]==1) {
//Something else
}

Re: game controller problems

PostPosted: Fri Oct 14, 2011 11:28 pm
by pikapika
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.

Re: game controller problems

PostPosted: Sat Oct 15, 2011 3:30 am
by Hblade
Button[0] is actually Button1, but I suppose its worth a shot to change the values up.

Re: game controller problems

PostPosted: Sat Oct 15, 2011 7:11 am
by pikapika
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.

Re: game controller problems

PostPosted: Sat Oct 15, 2011 4:04 pm
by Hblade
I dont know :(