|
how do u script a joystik(ps3 controller) into your game
#245355
01/09/09 16:34
01/09/09 16:34
|
Joined: Nov 2008
Posts: 41 ????????????
Dansta
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 41
????????????
|
hi i have calibratd the controller so it works on games tested it on mdk2 works but i want to know how you script so when you press certain buttons it works in the game, any help plz
Mmmmmmmmmmmmmmmmmmmmmm...Donuts!!!
|
|
|
Re: how do u script a joystik(ps3 controller) into your game
[Re: Cowabanga]
#245363
01/09/09 17:00
01/09/09 17:00
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
you can.
i guess it's not much diffrent from dualshock2 if you look from techincal side. i use dualshock 2. check joy_ vars in manual.
joy_raw joy_rot joy_hat joy_1...joy_12
3333333333
|
|
|
Re: how do u script a joystik(ps3 controller) into your game
[Re: Cowabanga]
#245364
01/09/09 17:01
01/09/09 17:01
|
Joined: Nov 2008
Posts: 41 ????????????
Dansta
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 41
????????????
|
u can i tried wiv one of the sample games and it worked using the Joy_ something script??
Mmmmmmmmmmmmmmmmmmmmmm...Donuts!!!
|
|
|
Re: how do u script a joystik(ps3 controller) into your game
[Re: Quad]
#245375
01/09/09 17:42
01/09/09 17:42
|
Joined: Aug 2008
Posts: 2,838 take me down to the paradise c...
Cowabanga
Expert
|
Expert
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
|
you can.
i guess it's not much diffrent from dualshock2 if you look from techincal side. i use dualshock 2. check joy_ vars in manual.
joy_raw joy_rot joy_hat joy_1...joy_12 Huh? how can you use Dualshock in GS? ppppplllllzzzzzz tell me how?
|
|
|
Re: how do u script a joystik(ps3 controller) into your game
[Re: Dansta]
#245379
01/09/09 17:54
01/09/09 17:54
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
FONT* font1 = "Arial#12b";
TEXT* message = {
strings = 1;
font = font1;
flags = SHOW;
string = "Press a joy button";
}
PANEL* leftan = {
pos_x = 200;
pos_y = 200;
digits(18,5,"left analog",font1,1,1);
flags = SHOW;
}
PANEL* rightan = {
pos_x = 600;
pos_y = 200;
digits(18,5,"left analog",font1,1,1);
flags = SHOW;
}
void main(){
wait(1);
while(1){
if(joy_1){
str_cat((message.pstring)[0],"\nJoy 1 pressed");
while(joy_1) wait(1);
}
if(joy_2){
str_cat((message.pstring)[0],"\nJoy 2 pressed");
while(joy_2) wait(1);
}
if(joy_3){
str_cat((message.pstring)[0],"\nJoy 3 pressed");
while(joy_3) wait(1);
}
if(joy_4){
str_cat((message.pstring)[0],"\nJoy 4 pressed");
while(joy_4) wait(1);
}
if(joy_5){
str_cat((message.pstring)[0],"\nJoy 5 pressed");
while(joy_5) wait(1);
}
if(joy_6){
str_cat((message.pstring)[0],"\nJoy 6 pressed");
while(joy_6) wait(1);
}
if(joy_7){
str_cat((message.pstring)[0],"\nJoy 7 pressed");
while(joy_7) wait(1);
}
if(joy_8){
str_cat((message.pstring)[0],"\nJoy 8 pressed");
while(joy_8) wait(1);
}
if(joy_9){
str_cat((message.pstring)[0],"\nJoy 9 pressed");
while(joy_9) wait(1);
}
if(joy_10){
str_cat((message.pstring)[0],"\nJoy 10 pressed");
while(joy_10) wait(1);
}
if(joy_11){
str_cat((message.pstring)[0],"\nJoy 11 pressed");
while(joy_11) wait(1);
}
if(joy_12){
str_cat((message.pstring)[0],"\nJoy 12 pressed");
while(joy_12) wait(1);
}
leftan.pos_x += joy_raw.x*0.1*time_step;
leftan.pos_y += joy_raw.y*0.1*time_step;
rightan.pos_x += joy_rot.x*0.1*time_step;
rightan.pos_y += joy_rot.y*0.1*time_step;
wait(1);
}
}
this uses 12 buttons and 2 analogs. for joystick movement(i mean swinging the device and such) use joy_force
3333333333
|
|
|
Re: how do u script a joystik(ps3 controller) into your game
[Re: Cowabanga]
#245397
01/09/09 19:33
01/09/09 19:33
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
i dont remember where i got it but i have dualshock2 to usb convertor cable.
3333333333
|
|
|
Re: how do u script a joystik(ps3 controller) into your game
[Re: Quad]
#246910
01/17/09 21:39
01/17/09 21:39
|
Joined: Nov 2008
Posts: 41 ????????????
Dansta
OP
Newbie
|
OP
Newbie
Joined: Nov 2008
Posts: 41
????????????
|
I tried ur script Quadraxas i copied and pasted ur script into sed and it come up with all these errors what do i do please?
Mmmmmmmmmmmmmmmmmmmmmm...Donuts!!!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|