# 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

Message
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.
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
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.
Posted: 21st Dec 2002 01:03
Ok, thanks!! I will try that out.

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)....

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
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-