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 / Making objects move left and right. I have up and down already

Author
Message
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 21st Dec 2002 00:18
Ok, here is a code I have now.



Now, I have that, which makes the sphere move backwards and fowards. Does anyone know how I can make it go up and down? I know I will have to change the code around, but does anyone know? And, how would I go about making the sphere go left and right? I have tried other things but cannot find out how to do that. Any help will be greatly appreciated! Thanks and bye!

P.S. I made the code above myself, and I am new, so I cant do much, so I think from looking at nothing while writng that code, for me, was pretty good.
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 21st Dec 2002 00:31
playerx= object position x(1)
if leftkey()= 1 then inc playerx,10

position object 1,playerx,y,z

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 21st Dec 2002 00:40
I'm wondering why you are moving the object based on it's angle. The second value in the move object command should be a distance. Anyway, to move the object you could do one of two (three) things. The first is to rotate the object a bit, move it, and then rotate it back, all in one go. You would do this by using:



The other way of doing it is a bit more complex, you could either use newxvalue and newzvalue or sin/cos functions. The newxvalue commands work based on an angle, so you can put the angle it is currently facing plus 90 in the command.



or



Play about with those commands, look them up in the help etc.

To move up and down, just rotate in a different direction, or use newyvalue or something.
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 21st Dec 2002 01:03
Ok, thanks!! I will try that out.

Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 21st Dec 2002 03:49
Alright, I am trying something else but my stupid ENTER/RETURN button isnt working in stupid DBPRO(sry, it aint really that stupid)....

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 21st Dec 2002 05:04
Are you using keystate(28) ?

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
ChronicFear
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 21st Dec 2002 06:54
Its not that complex really. I suggest you go to the Create section of the db page

Your suffering cause of me its divine
-Korn-

Login to post a reply

Server time is: 2024-02-23 13:09:37
Your offset time is: 2024-02-23 13:09:37