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 / How do you set boundries to where your object can go?

Author
Message
Programmer Xtreme
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: Wack House
Posted: 30th Sep 2004 09:06

If you know please help! I suck..... But, Soon My friends and I will get to program together, but they are out o town, so I need help.

Programmers United-Programming for programmers
Final Epsilon
20
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 30th Sep 2004 11:17
after your movement code, you check for boundaries. ie:
if x#>1000, then x#=1000

Which is, if your x value is past 1000 units, then put the x back to 1000, which will prevent you from going past 1000.

Using this, you can set some simple boundaries.
Programmer Xtreme
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: Wack House
Posted: 30th Sep 2004 11:45
Cool!

Programmers United-Programming for programmers

Login to post a reply

Server time is: 2024-11-27 10:23:28
Your offset time is: 2024-11-27 10:23:28