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.

Newcomers DBPro Corner / camera3d move ? im so fu**ing stupid :D

Author
Message
Zydar
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 28th Apr 2003 18:01 Edited at: 28th Apr 2003 18:29
someone tell me camera move script
like W= forward
S= back
A= strafe left
S = strafe right

and maxium speed is hmm.. 26 and if w=0 then speed dec 2,.
or something like that :-s

u can mail tha answer me in Zydars@hotmail.com

örör Prööt !!

Zydar
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 28th Apr 2003 18:14
Hmm.. i wanna know movement like counter-strike
w,a,s,d buttons and mouse look

NachoMan
21
Years of Service
User Offline
Joined: 14th Apr 2003
Location: United Kingdom
Posted: 29th Apr 2003 01:01
on the examples there is a great program where you press a key and it will give you the scancode. type in scancode() and then press F1, it will give you the example there. Run it and all you have to do is press the buttons and it will give you the scancode number. Then to implement this:
if scancode() = 83 then move camera 10
if scancode() = 72 then yrotate camera 5

just an example
Angel
21
Years of Service
User Offline
Joined: 27th Jun 2003
Location: United States
Posted: 22nd Jul 2003 19:28
Don't confuse stupidity with inexperience.......
I'm not inexperienced,I Know A way or two....

Wanna Go On A Data???
hooray_for_db
21
Years of Service
User Offline
Joined: 11th Jul 2003
Location: United States
Posted: 25th Jul 2003 01:50
Actually, why even bother with scancode()?

Maybe something along the lines of:

If inkey$() = "w" then [move camera/inc speed, etc...]
If inkey$() = "s" the [move camera/dec speed, ...]

Are you using the original Dark Basic? I think the
Further Tutorials booklet has examples of most kind
of movement, strafing and mouselook included. Maybe
start with that and modify to meet your needs.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Jul 2003 19:48
Scancode is easier in situations where you want to be able to use more than one key at a time - ie: when firing and moving forwards at the same time.

TDK
hooray_for_db
21
Years of Service
User Offline
Joined: 11th Jul 2003
Location: United States
Posted: 26th Jul 2003 06:55
Thanks! That's good to know.
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 26th Jul 2003 23:56
Quote: "If inkey$() = "w" then [move camera/inc speed, etc...]
If inkey$() = "s" the [move camera/dec speed, ...]"

yeah, but it isn't a good idea
I have a keyboard qwertz
what if I move the cam with ZGHJ ? there's a small problem

"He will come...the voice from the outer world,
bringing the holy war, the Jihad, which will cleanse the Universe and bring us out of darkness."
hooray_for_db
21
Years of Service
User Offline
Joined: 11th Jul 2003
Location: United States
Posted: 27th Jul 2003 07:08
You're right, but Zydar specifically asked for W,A,S,D.
...looks like I fit TWO pieces of bad advice into one short chunk of incomplete code!

Hmmm... just thought of something. Do you happen to know if the scancodes of a qwertz keyboard would parallel those of a qwerty?
hooray_for_db
21
Years of Service
User Offline
Joined: 11th Jul 2003
Location: United States
Posted: 28th Jul 2003 11:06
to clarify my question:

On my qwerty keyboard, the scancodes for w,a,s,d are 17, 30, 31, 32.
Would the letters you (Attreid) use for movement Z,G,H,J on a qwertz keyboard have the same scancodes as my wasd, i.e. 17, 30, 31, 32?

Login to post a reply

Server time is: 2024-09-20 17:48:31
Your offset time is: 2024-09-20 17:48:31