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 Discussion / joystick commands, strafing and locking on???!?!?!?!?!?

Author
Message
pitbull34
21
Years of Service
User Offline
Joined: 27th Sep 2003
Location:
Posted: 10th Feb 2004 05:01
Hello all. I have a question I have only been programming for about six months and I realy suck at it so far. Does anyone know codes for first person or third person controls for a control pad? So far I can move back and forth and I can rotate left and rotate right, but how do I look up, down, and strafe left and right, I can do this with the mouse but I dont want to use the mouse. I have been playing with different commands for controls on the buttons, but does dark basic have commands for the left and right buttons (you the buttons on the bottom of the pad)? I havent found any.
I am trying to design control for a character kinda like turock or blood rayne, I have never played quake or unreal but I assume they probably have the same controls. (You know the d pad moves forward, back, strafe left,right, and the a,b,c,d look up,down,rotate left,right, and the left button shoots and the right button jumps or hits). Could some one help me? also if I am not being a pain in the #$# is there a command where I can press on one of the buttons to lock on a target, much like wind waker or metroid prime?

thanx much!!!! dont mean to be a pain!!!!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 10th Feb 2004 11:11
For using the Game pad, you have to use the Joystick commands if I remember correctly, but for that to work, the Game pad has to be set up as a Joystick in windows ( not too sure how to do that one I'm afraid ).

For the lock on, you have to write your own code, and just check the distance between the centre of the screen and the Object Screen X and Obejct Screen Y and if it is about, say 100 or so pixels, then lock onto it ( ie, point the camera directly at it ).

Hope I Helped...
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
pitbull34
21
Years of Service
User Offline
Joined: 27th Sep 2003
Location:
Posted: 12th Feb 2004 00:42
well... I already know about hooking up my pad to the pc. I have programmed my character to look left and look right, I can move forward and backward, I just dont know any commands just to move to the left or right, or as it is put "strafing". And I dont know the commands to look up or look down. I have done all this on a game pad I just need to know those other commands, and I need to know if there is commands for those two buttons at the top of the controller, you know the Left and right ones, although they should be read as f and g I believe, I have tried all kinds of experiments and those buttons just dont register so I am thinking that dark basic only supports so many buttons. Thanx for the info though, maybe this cleared up my question a bit. Is there a dark basic upgrade that supports more joystick commands? Does DB pro have more and better commands for controllers? Thanx again!!
pitbull34
21
Years of Service
User Offline
Joined: 27th Sep 2003
Location:
Posted: 12th Feb 2004 00:43
Sorry to ask you again But how do you exactly write your own code?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Feb 2004 04:19
You have to code all the looking/moving yourself using the NewXvalue, NewYValue and NewZValue commands.

Also, for the buttons and movement, you just have to experiment with all of the possible buttons for the joystick, and see if DB reads them or not.

The furthest upgrade you can get is v1.13 with the Enhancement pack... patch v1.13 is free for download from this site, but the Enhancement pack costs.

For the lock-on, just use something like;



But, you'll have to change it so that it uses the controls for the game pad.

Hope I Helped...
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
pitbull34
21
Years of Service
User Offline
Joined: 27th Sep 2003
Location:
Posted: 12th Feb 2004 06:54
totally cool!!! I understand the lock on command now. Thanx for the info it did help!
thanx again!!
Ben
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Feb 2004 11:45
Awesome... Another satisfied user

Glad To Have Helped, Ben.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 19:25:44
Your offset time is: 2025-05-22 19:25:44