Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Joystick Control Question

Author
Message
DARKGirl
23
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Right behind you....
Posted: 23rd Mar 2003 13:18
Using Laptop with:
DBPro with Patch 4
Windows XP Service Pack 1
DirectX v. 8.1
Mobile Pentium 4 ~1700
256MB Total Physical Memory
Mobility Radeon 7500 AGP (LW), 64MB
Unknown Motherboard
_____________________________________________________

When you are refering to a different game controller do you use the code:

if joystick up(1) = 1 then.... 'the (1) refers to the up button on controller1
if joystick up(2) = 1 then.... 'the (2) refers to the up button on controller2
etc...

...or, do I have to change the current device each time I want to refer to a different controller by using the Set Control Device command?

Thanks for the help
Flux
“I create games only to test my imagination’s limits” - MSB
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd Mar 2003 13:55 Edited at: 23rd Mar 2003 13:56
Apparently you need to call set control device before each of the joystick ports (if you want to read more than 1)...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
DARKGirl
23
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Right behind you....
Posted: 23rd Mar 2003 14:19
Thankx, I was just wondering, but now I have to add a whole lot of set control device commands in my program. I was really hoping that the way I was doing it was the right way, but, oh well. Thanks for the help!

flux

“I create games only to test my imagination’s limits” - MSB
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd Mar 2003 14:25
You could try my FunctionMapper DLL - however, it is complicated to setup as the controls you can set up can define mouse, keyboard and up to 16 or so joystick controls. Plus it overrides escape handling.

However, once the controls have been setup it should makde joystick reading easier...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
DARKGirl
23
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Right behind you....
Posted: 23rd Mar 2003 14:36
I have another qwik question.
the set control device command uses the name as a string, does that mean I have to actually find the name of the device, or can i refer the name as a number? I hope I am making sense...because the example code here:



shows that checklist quantity is a number. So what does string$ refer to? And how would I find the name of a particular device?

Oh, and picture this senario: The user has a device connected, such as a light gun, that does not conform to the game's native controls, (in that this example, the game uses a regular control pad for input) how can the game tell what type of device is connected without messing everything up?

Ha! I laugh at this because I once thought that I had a good grasp of the way that input device were handled within DarkBASIC, only to find out that there is a whole lot more to it. And I am sure that the answer is staring me right in the face, but I am jest not seeing it.

Thanks for the much needed help,

Fluxtridonis

“I create games only to test my imagination’s limits” - MSB
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 23rd Mar 2003 14:38 Edited at: 23rd Mar 2003 14:38




Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
DARKGirl
23
Years of Service
User Offline
Joined: 2nd Feb 2003
Location: Right behind you....
Posted: 23rd Mar 2003 14:58
Great, thankx PneumaticDryll, but do not think I am a nit-wit when I ask this question, I jest want to make sure that everything works perfectly. Now, I am gessing that according to your code, in order to refer to a particular device, one would type:



Would that code work?

Thankx,

Flux

“I create games only to test my imagination’s limits” - MSB
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 23rd Mar 2003 16:52
yep

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.

Login to post a reply

Server time is: 2026-07-10 20:57:38
Your offset time is: 2026-07-10 20:57:38