right i tried the code and i get no errors. but my ship disapears when ever i add the sky box.
heres the code before i added the sky box (and it works fine)
Rem Project: Tyran 3D
Rem Created: 14/06/2004 17:24:26
Rem ***** Main Source File *****
Set Display Mode 1024,768,32
Sync on
backdrop off
hide mouse
REM Load All Required Graphics For Title
Load Bitmap "DLS.bmp",1
Load Bitmap "title.bmp",2
Load Image "StarBG.bmp",5
Load Image "HUD.bmp",6
REM Load Button Images
Load Image "Training_Button.bmp",1
Load Image "Play_Button.bmp",2
Load Image "Option_Button.bmp",3
Load Image "Quit_Button.bmp",4
REM Load Game Objects
Load Object "Ship1.x",1
REM Hide Objects till Needed
Hide Object 1
REM Load Intro Sequence
Copy Bitmap 1,0,0,1024,768,0,0,0,screen width(),screen height()
sync
sleep 2000
delete bitmap 1
_title_screen:
Copy Bitmap 2,0,0,1024,768,0,0,0,screen width(),screen height()
Paste Image 1,800,500,1
Paste Image 2,780,550,1
Paste Image 3,760,600,1
Paste Image 4,740,650,1
REM Set all text settings
set text font "times new roman"
set text size 20
center text 100,700,"Beta Test Game"
show mouse
Do
Button(1,800,500,1)
Button(2,780,550,1)
Button(3,760,600,1)
Button(4,740,650,1)
sync
Loop
Function Button(image,ButtonX,ButtonY,mouse_button)
REM Do this if image 1 is clicked (Training Button)
If mouseclick() = mouse_button and image = 1
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
` We got here because the button was pressed
endif
endif
endif
REM Do this if image 2 is clicked (Play Button)
If mouseclick() = mouse_button and image = 2
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
gosub _Play_Game
endif
endif
endif
REM Do this if image 3 is clicked (Options Button)
If mouseclick() = mouse_button and image = 3
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
gosub _Option_Screen
endif
endif
endif
REM Do this if image 4 is clicked (Quit Button)
If mouseclick() = mouse_button and image = 4
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
` We got here because the button was pressed
END
endif
endif
endif
endfunction
_Option_Screen:
cls
Copy Bitmap 2,0,0,1024,768,0,0,0,screen width(),screen height()
set text size 40
set text to bolditalic
center text 320,270,"CONTROLS:"
set text size 20
set text to normal
text 220,320, "Space Bar : Fires All Guns"
text 220,350, "Control: Fires Main Gun"
text 220,380, "Leftkey : Move Ship Left"
text 220,410, "Rightkey : Move Ship Right"
Paste Image 4,140,650,1
sync
Do
If mouseclick() = 1
if mousex() >= 140 and mousex() <= 140+150
if mousey() >= 650 and mousey() <= 650+31
cls
gosub _title_screen
endif
endif
endif
sync
Loop
_Play_Game:
cls
color backdrop rgb(0,0,0)
backdrop on
object_x = 0
object_y = -1.5
object_z = 0
REM Set Player Ships Setting
Rotate Object 1, 90, 180, 90
Scale Object 1, 20, 20, 20
Position Object 1,object_x,object_y,object_z
Show Object 1
REM Setup camera position
autocam off
sync
Do
paste image 6,0,screen height()-200,0
REM control players movement
if leftkey() = 1 then move object left 1,0.01
if rightkey() = 1 then move object right 1,0.01
REM ========== this bit is only test code ===================
if returnkey() = 1 then cls: hide object 1: backdrop off: gosub _title_screen
REM =========================================================
sync
Loop
And heres the code after i add the sky box.
Rem Project: Tyran 3D
Rem Created: 14/06/2004 17:24:26
Rem ***** Main Source File *****
Set Display Mode 1024,768,32
Sync on
backdrop off
hide mouse
REM Load All Required Graphics For Title
Load Bitmap "DLS.bmp",1
Load Bitmap "title.bmp",2
Load Image "StarBG.bmp",5
Load Image "HUD.bmp",6
REM Load Button Images
Load Image "Training_Button.bmp",1
Load Image "Play_Button.bmp",2
Load Image "Option_Button.bmp",3
Load Image "Quit_Button.bmp",4
REM Load Game Objects
Load Object "Ship1.x",1
make object sphere 10,100
REM Hide Objects till Needed
Hide Object 1
Hide Object 10
REM Load Intro Sequence
Copy Bitmap 1,0,0,1024,768,0,0,0,screen width(),screen height()
sync
sleep 2000
delete bitmap 1
_title_screen:
Copy Bitmap 2,0,0,1024,768,0,0,0,screen width(),screen height()
Paste Image 1,800,500,1
Paste Image 2,780,550,1
Paste Image 3,760,600,1
Paste Image 4,740,650,1
REM Set all text settings
set text font "times new roman"
set text size 20
center text 100,700,"Beta Test Game"
show mouse
Do
Button(1,800,500,1)
Button(2,780,550,1)
Button(3,760,600,1)
Button(4,740,650,1)
sync
Loop
Function Button(image,ButtonX,ButtonY,mouse_button)
REM Do this if image 1 is clicked (Training Button)
If mouseclick() = mouse_button and image = 1
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
` We got here because the button was pressed
endif
endif
endif
REM Do this if image 2 is clicked (Play Button)
If mouseclick() = mouse_button and image = 2
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
gosub _Play_Game
endif
endif
endif
REM Do this if image 3 is clicked (Options Button)
If mouseclick() = mouse_button and image = 3
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
gosub _Option_Screen
endif
endif
endif
REM Do this if image 4 is clicked (Quit Button)
If mouseclick() = mouse_button and image = 4
if mousex() >= ButtonX and mousex() <= ButtonX+150
if mousey() >= ButtonY and mousey() <= ButtonY+31
` We got here because the button was pressed
END
endif
endif
endif
endfunction
_Option_Screen:
cls
Copy Bitmap 2,0,0,1024,768,0,0,0,screen width(),screen height()
set text size 40
set text to bolditalic
center text 320,270,"CONTROLS:"
set text size 20
set text to normal
text 220,320, "Space Bar : Fires All Guns"
text 220,350, "Control: Fires Main Gun"
text 220,380, "Leftkey : Move Ship Left"
text 220,410, "Rightkey : Move Ship Right"
Paste Image 4,140,650,1
sync
Do
If mouseclick() = 1
if mousex() >= 140 and mousex() <= 140+150
if mousey() >= 650 and mousey() <= 650+31
cls
gosub _title_screen
endif
endif
endif
sync
Loop
_Play_Game:
cls
color backdrop rgb(0,0,0)
backdrop on
set camera range 1,100
object_x = 0
object_y = -1.5
object_z = 0
REM Set Player Ships Setting
Rotate Object 1, 90, 180, 90
Scale Object 1, 20, 20, 20
Position Object 1,object_x,object_y,object_z
Show Object 1
Show Object 10
texture object 10,5
set object cull 10,1
REM Setup camera position
autocam off
sync
Do
position object 10, object position x(1),object position y(1),object position z(1)
yrotate object 10,object angle y(10) - 0.01
paste image 6,0,screen height()-200,0
REM control players movement
if leftkey() = 1 then move object left 1,0.01
if rightkey() = 1 then move object right 1,0.01
REM ========== this bit is only test code ===================
if returnkey() = 1 then cls: hide object 1: backdrop off: gosub _title_screen
REM =========================================================
sync
Loop
where am i going wrong with it. i only added like 6 lines to the code nothing more