hello,
I think I see. When the up key is pressed, your xv variable increases. Once it reaches 1000, your sphere starts moving at 10 units per loop. If I press the down key, that will decrease xv, and if it falls below 1000, the sphere stops.
Actually, everybody was pretty right on with their solutions to your problem without ever seeing your code! You have to put a limit on how far you want the sphere to move.
You can do it in many different ways. Since your using Move Object, your basing the movement on which way the object is facing. You can use minimal commands to just create a scaler so that when it reaches a certain value, you could set pos = 0. I didn't have your media so I created a bunch more spheres:
sync on : sync rate 100
autocam off
`backdrop on
make matrix 5,5000,5000,10,10
for gordon = 1 to 4
make object sphere gordon,50
position object gordon,rnd(2000),Y#,rnd(2000)
next gordon
Y#=get ground height(5,2000,2000)
set ambient light 30
color ambient light RGB(100,200,120)
make object sphere 1000,100
position object 1000, 100,Y#,100
toggle=0
xv=200
make object cone 100,100
fix object pivot 100
lock object on 100
xrotate object 100,90
scale object 100,500,500,500
position object 100,0,Y#,0
pos=10
`add variable to set movement distance
how_far=0
do
set cursor 0,0
print camera position x()
print camera position z()
print xv
`If the key with number 32 is pressed (the letter q). Toggle
if keystate(16) > 0 and hold = 0
hold = 1
if toggle = 0
toggle = 1
`fog on
`backdrop on
`color backdrop rgb(0,0,0)
set gamma 255,0,0
else
toggle = 0
`fog off
` backdrop off
set gamma 255,255,255
endif
endif
if scancode() = 0 then hold = 0
if upkey()=1
inc xv,10
move camera 6
endif
if downkey()=1
dec xv,10
move camera -6
endif
if leftkey()=1 then yrotate camera wrapvalue(camera angle y()-4)
if rightkey()=1 then yrotate camera wrapvalue(camera angle y()+4)
if xv>1000
set gamma 100,100,100
endif
if xv>1000
`how_far increase by the same units as
`pos causes your shpere to move per loop
how_far=how_far+pos
move object 1000,pos
color object 1000,rgb(rnd(255),rnd(255),rnd(255))
`set the value equivalent to how many units
`till it stops
if how_far=1000 then pos=0
endif
sync
loop
Enjoy your day.