Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Ayumi, Akow, monk12, AndrewAMD), 1,398 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
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
????????????
D
Dansta Offline OP
Newbie
Dansta  Offline OP
Newbie
D

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: Dansta] #245359
01/09/09 16:57
01/09/09 16:57
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
With PS3 joystick, You can't.

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 Offline
Senior Expert
Quad  Offline
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
????????????
D
Dansta Offline OP
Newbie
Dansta  Offline OP
Newbie
D

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 Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Originally Posted By: Quadraxas
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 Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Code:
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: Quad] #245380
01/09/09 17:56
01/09/09 17:56
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Thanks! smile , Oh, Another quesion, How did you connect the DualShock to the PC?

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 Offline
Senior Expert
Quad  Offline
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
????????????
D
Dansta Offline OP
Newbie
Dansta  Offline OP
Newbie
D

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!!!
Re: how do u script a joystik(ps3 controller) into your game [Re: Dansta] #246918
01/17/09 22:22
01/17/09 22:22
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
what errors?


3333333333
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1