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 / asistance with changing my movment

Author
Message
Azunaki
15
Years of Service
User Offline
Joined: 11th Feb 2009
Location:
Posted: 23rd Jun 2009 10:09 Edited at: 23rd Jun 2009 10:12
ok so my current code is this



what i want to change this to is WASD move forward(w) left(a) down(s) right(d).then have the camera face the courser(mouse)

but i don't have any idea how to make it move using this method

this is just for practice as ive never really explored far into darkbasic pro.

lol also wheres the default save location for windows XP...
the destroyer
15
Years of Service
User Offline
Joined: 24th Dec 2008
Location:
Posted: 23rd Jun 2009 12:25
here u go brother I hope this is what you want

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd Jun 2009 16:16
As an additional improvement, use

keystate(17) instead of inkey$()="w"
keystate(30) instead of inkey$()="a"
keystate(31) instead of inkey$()="s"
keystate(32) instead of inkey$()="d"

Inkey$() can only pick up one key at once, so if the player pressed w and then a they would only go forwards. Keystate() allows you to check multiple keys at once so the player can go diagonally if they want to.



Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?
Azunaki
15
Years of Service
User Offline
Joined: 11th Feb 2009
Location:
Posted: 23rd Jun 2009 18:49
i'll look into both options thanks.

and again can any one tell me were the default save location is....
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 23rd Jun 2009 21:53
Wherever you choose it to be when you save the project.

If the project isn't saved then it just compiles the .exe into the windows temp folder.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Azunaki
15
Years of Service
User Offline
Joined: 11th Feb 2009
Location:
Posted: 23rd Jun 2009 23:34
also were could i find a full list of codes to go in keystate()

ok well i can't find it (i didn't put a location i just saved and closed it.. that's why asked.) but all the code i used is in here so im not worried.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd Jun 2009 23:41
Attached



Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?

Attachments

Login to view attachments
Azunaki
15
Years of Service
User Offline
Joined: 11th Feb 2009
Location:
Posted: 24th Jun 2009 00:10 Edited at: 24th Jun 2009 00:29
thanks bmac

ok and im still wondering hoe to rotate the camera using the mouse.

(could i at least get a push in the right direction)

ok so i did some looking through the command window and found mousex and mousey

now i guessing i would have to use these with the yrotate camera and xrotate camera. but how would i go about that.
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 25th Jun 2009 00:33
i would use the MouseMoveX() and MouseMoveY() commands. They seem to work better for me. They catch the value of how far it moved instead of where it is located.

I would also use the TURN CAMERA RIGHT and PITCH CAMERA UP commands.

Something like:



I'm still a n00b myself, so this is more from experience than from what might actually be the l33t coding standard. Hope it helps!
Asteric
16
Years of Service
User Offline
Joined: 1st Jan 2008
Location: Geordie Land
Posted: 6th Jul 2009 23:48
Also one other thing, no biggy, but you make an object, a matrix and a camera, and go up 1,2,3, you dont need to do this if they are different types, as you use for example position OBJECT or position LIGHT followed by the number, so using the number 1 for them would be ok, and would keep the numbers down.

MrBill
17
Years of Service
User Offline
Joined: 23rd Feb 2007
Location:
Posted: 7th Jul 2009 00:23
For keystate help in the new editor just press CTRL + K or there is a keystate helper under tools.

Mr Bill

Login to post a reply

Server time is: 2024-09-28 08:21:52
Your offset time is: 2024-09-28 08:21:52