when ever i take it out, the program works fine, here is the rest of the code
Rem Project: Ghosts in the grave yard
Rem Created: 9/4/2005 10:27:40 PM
Rem ***** Main Source File *****
disable escapekey
load image "rustyiron.bmp", 3
`sounds
load music "music1.mp3", 1
load sound "hit tree.wav", 2
`objects
make object sphere 1,11
make object sphere 2,11
make object sphere 3,11
make object sphere 4,11
make object cube 5, 5
make object cube 47,3
load object "foker.x", 48
make object box 49,5,3,200
make object box 50,5,3,200
make object sphere 52,5
position object 48, 200, 0, 200,
lock object on 47
position object 47, 0,0, 5
load object "sky/am.x", 6
make matrix 1,5000,5000,50,50,
make camera 1
`debreies
make object box 7, rnd(50), rnd(50), rnd(50)
make object box 8, rnd(50), rnd(50), rnd(50)
make object box 9, rnd(50), rnd(50), rnd(50)
make object box 10, rnd(50), rnd(50), rnd(50)
make object box 11, rnd(50), rnd(50), rnd(50)
make object box 12, rnd(50), rnd(50), rnd(50)
make object box 13, rnd(50), rnd(50), rnd(50)
make object box 14, rnd(50), rnd(50), rnd(50)
make object box 15, rnd(50), rnd(50), rnd(50)
make object box 16, rnd(50), rnd(50), rnd(50)
make object box 17, rnd(50), rnd(50), rnd(50)
make object box 18, rnd(50), rnd(50), rnd(50)
make object box 19, rnd(50), rnd(50), rnd(50)
make object box 20, rnd(50), rnd(50), rnd(50)
make object box 21, rnd(50), rnd(50), rnd(50)
make object box 22, rnd(50), rnd(50), rnd(50)
make object box 23, rnd(50), rnd(50), rnd(50)
make object box 24, rnd(50), rnd(50), rnd(50)
make object box 25, rnd(50), rnd(50), rnd(50)
make object box 26, rnd(50), rnd(50), rnd(50)
make object box 27, rnd(50), rnd(50), rnd(50)
make object box 28, rnd(50), rnd(50), rnd(50)
make object box 29, rnd(50), rnd(50), rnd(50)
make object box 30, rnd(50), rnd(50), rnd(50)
make object box 31, rnd(50), rnd(50), rnd(50)
make object box 32, rnd(50), rnd(50), rnd(50)
make object box 33, rnd(50), rnd(50), rnd(50)
make object box 34, rnd(50), rnd(50), rnd(50)
make object box 35, rnd(50), rnd(50), rnd(50)
make object box 36, rnd(50), rnd(50), rnd(50)
make object box 37, rnd(50), rnd(50), rnd(50)
make object box 38, rnd(50), rnd(50), rnd(50)
make object box 39, rnd(50), rnd(50), rnd(50)
make object box 40, rnd(50), rnd(50), rnd(50)
make object box 41, rnd(50), rnd(50), rnd(50)
make object box 42, rnd(50), rnd(50), rnd(50)
`d-pos
position object 7, rnd(900), 0,rnd(900)
position object 8, rnd(900), 0,rnd(900)
position object 9, rnd(900), 0, rnd(900)
position object 10, rnd(900), 0, rnd(900)
position object 11, rnd(900), 0, rnd(900)
position object 12, rnd(900), 0, rnd(900)
position object 13, rnd(900), 0, rnd(900)
position object 14, rnd(900), 0, rnd(900)
position object 15, rnd(900), 0, rnd(900)
position object 16, rnd(900), 0, rnd(900)
position object 17, rnd(900), 0, rnd(900)
position object 18, rnd(900), 0, rnd(900)
position object 19, rnd(900), 0, rnd(900)
position object 20, rnd(900), 0, rnd(900)
position object 21, rnd(900), 0, rnd(900)
position object 22, rnd(900), 0, rnd(900)
position object 23, rnd(900), 0, rnd(900)
position object 24, rnd(900), 0, rnd(900)
position object 25, rnd(900), 0, rnd(900)
position object 26, rnd(900), 0, rnd(900)
position object 27, rnd(900), 0, rnd(900)
position object 28, rnd(900), 0, rnd(900)
position object 29, rnd(900), 0, rnd(900)
position object 30, rnd(900), 0, rnd(900)
position object 31, rnd(900), 0, rnd(900)
position object 32, rnd(900), 0, rnd(900)
position object 33, rnd(900), 0, rnd(900)
position object 34, rnd(900), 0, rnd(900)
position object 35, rnd(900), 0, rnd(900)
position object 36, rnd(900), 0, rnd(900)
position object 37, rnd(900), 0, rnd(900)
position object 38, rnd(900), 0, rnd(900)
position object 39, rnd(900), 0, rnd(900)
position object 40, rnd(900), 0, rnd(900)
position object 41, rnd(900), 0, rnd(900)
position object 42, rnd(900), 0, rnd(900)
`images
load image "grass.bmp", 2
PREPARE MATRIX TEXTURE 1, 2, 1, 1
UPDATE MATRIX 1
POSITION MATRIX 1, -500, -10, -500
load image "1ghost.bmp", 1
`setup
hide object 49
hide object 50
`texturing
texture object 1, 1
texture object 2, 1
texture object 3, 1
texture object 4, 1
texture object 52, 5
ghost object on 1
ghost object on 2
ghost object on 3
ghost object on 4
ghost object on 52
`positioning
position object 1, -30,0,500
position object 2, 500,0,0
position object 3, 500,0,550
position object 50, 83, 0, 100
position object 52, 200,2000000,2000
yrotate object 50, 40
position object 49, -83, 0, 100
yrotate object 49, -40
scale object 48, 10,10,10
xrotate object 48, 260
set object 6,1,0,0,0,0,0,0
scale object 6, 25,25,25,
position camera 1, 200,0,200
`camera
hide mouse
`boundries
make object box 43, 15000, 3, 1,
position object 43, 0, 0, 1
make object box 44, 15000, 3, 1,
position object 44, 0, 0, 0
rotate object 44, 0, 80, 0,
make object box 45, 0, 3, 1500
position object 45, 0, 0, 500
rotate object 45, 0, 80, 0,
make object box 46, 0, 3, 1500
position object 46, 500, 0, 0
rotate object 46, 0, 0, 0,
texture object 43, 3
texture object 44, 3
texture object 45, 3
texture object 46, 3
```````````
`main loop`
```````````
do
yrotate object 52, object angle y(52)+2
if object collision(1,49)>0 then yrotate object 1, object angle y(1)+50
if object collision(1,50)>0 then yrotate object 1, object angle y(1)-50
if object collision(2,49)>0 then yrotate object 2, object angle y(1)+50
if object collision(2,50)>0 then yrotate object 2, object angle y(1)-50
if object collision(3,49)>0 then yrotate object 3, object angle y(1)+50
if object collision(3,50)>0 then yrotate object 3, object angle y(1)-50
if object collision(4,49)>0 then yrotate object 4, object angle y(1)+50
if object collision(4,50)>0 then yrotate object 4, object angle y(1)-50
position object 49, camera position x(1), 0, camera position z(1)+2
position object 50, camera position x(1), 0, camera position z(1)+2
rotate object 49, camera angle x(1), camera angle y(1)-40, camera angle z(1)
rotate object 50, camera angle x(1), camera angle y(1)+40, camera angle z(1)
hide object 47
if object collision(48, 5)=1 then show object 47,
if inkey$()="e" then end
if object collision(43, 5)>0 then position camera 1, camera position x(1),camera position y(1), camera position z(1) +1
if object collision(44, 5)>0 then position camera 1, camera position x(1)+1, camera position y(1), camera position z(1),
if object collision(45, 5)>0 then position camera 1, camera position x(1), camera position y(1), camera position z(1)-1,
if object collision(46, 5)>0 then position camera 1, camera position x(1)-1, camera position y(1), camera position z(1),
if object collision(43, 5)>0 then position camera 1, camera position x(1),camera position y(1), camera position z(1) +1
if object collision(44, 5)>0 then play sound 2
if object collision(45, 5)>0 then play sound 2
if object collision(46, 5)>0 then play sound 2
position object 6, camera position x(1),camera position y(1),camera position z(1)
`move it!
if object in screen(1)=0 then move object 1, 0.8
if object in screen(1)=1 then move object 1, 0
if object in screen(2)=0 then move object 2, 0.8
if object in screen(2)=1 then move object 2, 0
if object in screen(3)=0 then move object 3, 0.8
if object in screen(3)=1 then move object 3, 0
if object in screen(4)=0 then move object 4, 0.8
if object in screen(4)=1 then move object 4, 0
if object collision(1,5)=1 then execute file "dead.exe","",""
if object collision(1,5)=1 then end
if object collision(2,5)=1 then execute file "dead.exe","",""
if object collision(2,5)=1 then end
if object collision(3,5)=1 then execute file "dead.exe","",""
if object collision(3,5)=1 then end
if object collision(4,5)=1 then execute file "dead.exe","",""
if object collision(4,5)=1 then end
loop music 1
position object 5, camera position x(1),camera position y(1),camera position z(1)
control camera using arrowkeys 1,1,2,
point object 1, camera position x(1),camera position y(1),camera position z(1)
point object 2, camera position x(1),camera position y(1),camera position z(1)
point object 3, camera position x(1),camera position y(1),camera position z(1)
point object 4, camera position x(1),camera position y(1),camera position z(1)
loop
hope this helps,
rvb Church: "hey, look, his armor its, red."
rvb Tucker: "well that'l explain how he got past our defences."
rvb Caboose : "Actuley he came through the back."