Okay, nevermind, I can't get it to work. Shouldn't the code below work?
sync on
sync rate 100
`Make the Sphere, Position it about the plain, and rotate it so you can move it back and forth
make object sphere 1,10
position object 1,0,100,0
yrotate object 1,90
set object collision on 1
set object collision to polygons 1
`Make the Plain, Position and angle it so it is a slope
make object plain 2,200,200
position object 2,0,0,0
rotate object 2,0,89,-65
set object collision on 2
set object collision to polygons 2
`Just positioning the camera
position camera 0,0,-500
point camera 0,50,0
`Making global variable for the distance
global dist as float
do
`Gets the intersect distance (supposedly), ToY=-1000 just cause I need to project a line
`that goes below the plain
dist=intersect object (1,object position x(1),object position y(1),object position z(1),object position x(1),-1000,object position z(1))
`Prints the coordinates and distance
set cursor 0,0
print "X: " ; object position x(1)
print "Y: " ; object position y(1)
print "Z: " ; object position z(1)
print "Dist: " ; dist
`Moves the sphere
if (1=leftkey()) THEN move object 1,.5
if (1=rightkey()) THEN move object 1,-.5
`Positions the sphere at the intersection point
position object 1,object position x(1),object position y(1)-dist,object position z(1)
sync : loop
I don't know why it works. When I run it the sphere just moves down. If I remove the part that says "object position y(1)-" (in the positioning portion), then the sphere doesn't move up or down. Why won't it work?