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 / moving blocks

Author
Message
Noob
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United Kingdom
Posted: 13th May 2003 18:48
i want to move a block up and down on the screen by itself how do i do this only needs to move 5cm down then back up again and repeat this action

Thanks
Moggie100
21
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 13th May 2003 19:09 Edited at: 13th May 2003 19:10
well, if you want it to move up and down without slowing down at the ends of its travel you could use this code.



In this code, it will move an object (object 1) up and down by 5 units continuously, with the 'ymove' variable setting the movement speed, and the '_dir' variable so set the direction so that it reverses at the end of each movement.

I will do a smoother movement peice of code when I get home (at school now) back l8rz

Noob
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United Kingdom
Posted: 13th May 2003 21:04
Is this code for DB Pro? I had problems when i tried to get it working
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 13th May 2003 23:22 Edited at: 13th May 2003 23:23
You probably get an error because of the "_" symbol.

Here's a code that works with the sine function.
You can change movement# and speed#



"All programmers are playwrites and all computers are lousy actors" -Anon

Login to post a reply

Server time is: 2024-09-20 07:55:37
Your offset time is: 2024-09-20 07:55:37