OK, I see what you're doing (and it's great!), but now when I run it inside my program I get an error: "Object does not exist".
Here's the bit of code that you wrote and I put it in (with slight modifcation):
`make moving elevators
load object "Textures-Objects\pole.3ds",101 : position object 101,10,5,-10 : scale object 101,100,150,100 :zrotate object 101,90
make object box 102,5,1,5 :position object 102,10,0,-10
set object collision on 102 : make object collision box 102,-2.5,-.5,-2.5,2.5,.5,2.5,0
make object box 103,2,2,2 : position object 103,10,-5,-10
`store Y axis for elevator
Y# = 20
`make death plain
make object plain 500,1000,1000 : position object 500,0,-18,0 : hide object 500 : xrotate object 500,90
do
`print life and health information
ink rgb(0,50,250),0 : set cursor 0,0 : set text size 22
text 345,10,"Level Three"
text 20,70,"SCORE: "+str$(score)
text 20,45,"COINS: "+str$(coins)
text 600,45,"COINS LEFT: "+str$(coinsleft)
ink rgb(250,0,0),0 : set cursor 0,0 : set text size 22
text 20,100,"Red Coins: "+str$(rcoins)
`falling death
if object collision(1,500) then play sound 3 : score = score -15 : sleep 1000 : position object 1,0,10,0
`elevator move
X#=Object position X(102)
Z#=object position Z(102)
if inkey$()="u" and go=0 then go=1
if inkey$()="d" and go=0 then go=2
If go=1
Y#=Y#+2
if Y#>1000
go=0
endif
endif
if go=2
Y#=Y#-2
if Y#<20
Y#=20
Go=0
endif
endif
`store old positions
oldposx#=object position x(1) : oldposy#=object position y(1) : oldposz#=object position z(1)
`move platforms
move object 100,0.02
`controls
if upkey()=1 then move object 1,0.23
if downkey()=1 then move object 1,-0.23
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-1.5)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+1.5)
if spacekey()=1 and playergrav#=0 then playergrav#=0.30 : play sound 4
` get current object position
posx#=object position x(1)
posy#=object position y(1)
posz#=object position z(1)
` gravity
playergrav#=playergrav#-0.01
posy#=posy#+playergrav#
`sliding collision
position object 1,posx#,posy#,posz#
if object collision(1,0)>0
dec posx#,get object collision x()
dec posy#,get object collision y()
dec posz#,get object collision z()
playergrav#=-0.0
endif
`set size for controlled object
s#=object size y(1)/2.0
`update with new object position
position object 1,posx#,posy#,posz#
`camera
angle#=object angle y(1)
camdist#=10.5 : camhigh#=posy#+2.5 : camfade#=12.5
set camera to follow posx#,posy#,posz#,angle#,camdist#,camhigh#,camfade#,1
xrotate camera 10
`end loop
sync
loop
Is there something I'm missing? Should I just continue using 'elevator' as the object number?