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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 740 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to get input from joystick with more than 12 buttons? #321751
05/01/10 22:27
05/01/10 22:27
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Hi, that is my question. I've a Steering Wheel with more than 12 buttons and I need to use them, how can I do it?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: How to get input from joystick with more than 12 buttons? [Re: painkiller] #321752
05/01/10 22:44
05/01/10 22:44
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
I'm afraid, the engine can't do that, so you have to use the Winapi. This link might help:
http://msdn.microsoft.com/en-us/library/ms709377

Re: How to get input from joystick with more than 12 buttons? [Re: Lukas] #321754
05/01/10 23:24
05/01/10 23:24
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
I think I've found the solution! I can get input from any button with joy_buttons and joy2_buttons, here's the page from GS manual wich explains how to use it: http://www.conitec.net/beta/joy_buttons.htm


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: How to get input from joystick with more than 12 buttons? [Re: painkiller] #321872
05/02/10 23:07
05/02/10 23:07
Joined: Jul 2004
Posts: 21
K
Keebo Offline
Newbie
Keebo  Offline
Newbie
K

Joined: Jul 2004
Posts: 21
Does this mean that GS7/Lite C only supports 2 joysticks natively without resorting to outside apps?

I would really like to have a steering wheel/accelerator/brake and two joysticks for a current simulator training project I am working on without the extra work needed for other apps.

Re: How to get input from joystick with more than 12 buttons? [Re: Keebo] #322097
05/04/10 18:37
05/04/10 18:37
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
yes, i think you can only get input from two joysticks


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: How to get input from joystick with more than 12 buttons? [Re: painkiller] #329864
06/23/10 11:51
06/23/10 11:51
Joined: Jan 2010
Posts: 40
Adelaide, Australia
Sub_Game Offline
Newbie
Sub_Game  Offline
Newbie

Joined: Jan 2010
Posts: 40
Adelaide, Australia
Does anyone know how to implement the point of view hat on a joystick?


A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm
Re: How to get input from joystick with more than 12 buttons? [Re: Sub_Game] #329865
06/23/10 11:54
06/23/10 11:54
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
point of view hat:

joy_hat

and

joy2_hat

Re: How to get input from joystick with more than 12 buttons? [Re: Rei_Ayanami] #329871
06/23/10 12:17
06/23/10 12:17
Joined: Jan 2010
Posts: 40
Adelaide, Australia
Sub_Game Offline
Newbie
Sub_Game  Offline
Newbie

Joined: Jan 2010
Posts: 40
Adelaide, Australia
Thanks - works perfectly!

Code:
if(joy_hat == -1)
{	cam_glance_set_pan = 0;
	cam_glance_set_tilt = 0;
}
else if(joy_hat == 0) cam_glance_set_tilt = -30;
else if(joy_hat == 180) cam_glance_set_tilt = 40;
else if(joy_hat == 270)	cam_glance_set_pan = -90;
else cam_glance_set_pan = joy_hat;




A7 Commercial
First person submarine combat simulator project
http://alexanderforeman.webs.com/fightersubgame.htm

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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