Here's the code. How to do I get it into a dbo file? I don't see an option when I save it to do that.
Ps. I didn't mean to have half of my post bold. I guess I didn't do that right. Oops
REM edutainment
REM by abbas and sam
REM created 12/2/13 10:11 a.m.
GameStart:
autocam off
hide mouse
sync on : sync rate 60 : sync
rem ****____****_____loading section____****____****
rem images
load image "E:\My DBPRO Games\Edutainment\images\sky_texture.jpg",1 rem load
load image "E:\My DBPRO Games\Edutainment\images\skyscraper2_texture.jpg",2 rem load
load image "E:\My DBPRO Games\Edutainment\images\skyscraper3_texture.jpg",5 rem load
load image "E:\My DBPRO Games\Edutainment\images\skyscraper1_texture.jpg",4 rem load
load image "E:\My DBPRO Games\Edutainment\images\skyscraper4_texture.jpg",7 rem load
load image "E:\My DBPRO Games\Edutainment\images\blue_splashscreen.jpg",8 rem load
load image "E:\My DBPRO Games\Edutainment\images\road_texture2.jpg",9 rem load
load image "E:\My DBPRO Games\Edutainment\images\plane_texture.jpg",10 rem load
load image "E:\My DBPRO Games\Edutainment\images\waiting.jpg",11 rem load
load image "E:\My DBPRO Games\Edutainment\images\blue_splash.jpg",12 rem load
load image "E:\My DBPRO Games\Edutainment\images\nextlevel_wait.jpg",13 rem load
rem sounds
load music "E:\My DBPRO Games\Edutainment\sounds\car_revving.mp3",1 rem load
load sound "E:\My DBPRO Games\Edutainment\sounds\car_explosion.wav",2 rem load
paste image 8,0,0
sync
sleep 2500
rem ****____****____title intro thing____****____****
rem \/ start text page \/
sync
set text font "Comic Sans MS" : set text size 30 : set text to bold : set text transparent
delete image 8
sleep 1000
paste image 12,0,0
center text 320,20, "Welcome to a Friend in Need"
ink rgb(255,127,36),0
center text 321,21, "Welcome to a Friend in Need"
ink rgb(255,255,255),0
center text 320,50, "A Game About Transfering Energy"
ink rgb(255,127,36),0
center text 321,51, "A Game About Transfering Energy"
ink rgb(255,255,255),0
center text 320,425, "Press [A] to Continue"
ink rgb(255,127,36),0
center text 321,426, "Press [A] to Continue"
ink rgb(255,255,255),0
sync
do
if inkey$()="a"
do
if inkey$()<>"a" then cls : exit rem delete text
loop
exit
endif
loop
rem \/ start text page \/
sync
paste image 12,0,0
ink rgb(255,255,255),0
center text 320,20, "Drive to Your Friend Who"
ink rgb(255,127,36),0
center text 321,21, "Drive to Your Friend Who"
ink rgb(255,255,255),0
center text 320,50, "Is Low On Energy,"
ink rgb(255,127,36),0
center text 321,51, "Is Low On Energy,"
ink rgb(255,255,255),0
center text 320,80, "Only You Can Save Him!!!"
ink rgb(255,127,36),0
center text 321,81, "Only You Can Save Him!!!"
ink rgb(255,255,255),0
center text 320,425, "Press [A] to Continue"
ink rgb(255,127,36),0
center text 321,426, "Press [A] to Continue"
ink rgb(255,255,255),0
sync
do
if inkey$()="a"
do
if inkey$()<>"a" then cls : exit rem delete text
loop
exit
endif
loop
rem \/ start text page \/
sync
paste image 12,0,0
center text 320,80, "********************"
ink rgb(255,127,36),0
center text 321,81, "********************"
ink rgb(255,255,255),0
center text 320,110, "Press [P] To Play Easy Level"
ink rgb(255,127,36),0
center text 321,111, "Press [P] To Play Easy Level"
ink rgb(255,255,255),0
center text 320,140, "********************"
ink rgb(255,127,36),0
center text 321,141, "********************"
ink rgb(255,255,255),0
center text 320,170, "Press [O] To Play Medium Level"
ink rgb(255,127,36),0
center text 321,171, "Press [O] To Play Medium Level"
ink rgb(255,255,255),0
center text 320,200, "********************"
ink rgb(255,127,36),0
center text 321,201, "********************"
ink rgb(255,255,255),0
center text 320,230, "Press [I] To Play Expert Level"
ink rgb(255,127,36),0
center text 321,231, "Press [I] To Play Expert Level"
ink rgb(255,255,255),0
center text 320,260, "********************"
ink rgb(255,127,36),0
center text 321,261, "********************"
ink rgb(255,255,255),0
center text 320,290, "Press [U] To Play Bonus Level"
ink rgb(255,127,36),0
center text 321,291, "Press [U] To Play Bonus Level"
ink rgb(255,255,255),0
center text 320,320, "********************"
ink rgb(255,127,36),0
center text 321,321, "********************"
ink rgb(255,255,255),0
sync
do
if inkey$()="p"
do
if inkey$()<>"p" then cls :goto MainSection :paste image 11,0,0
loop
exit
endif
if inkey$()="o"
do
if inkey$()<>"o" then cls :goto NextLevelPlay :paste image 11,0,0
loop
exit
endif
if inkey$()="i"
do
if inkey$()<>"i" then cls :goto NextNextLevelPlay :paste image 11,0,0
loop
exit
endif
if inkey$()="u"
do
if inkey$()<>"u" then cls :goto PlaneLevelPlay :paste image 11,0,0
loop
exit
endif
loop
sync
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rem ****____****____MainSection Start____****____****
MainSection:
load object "E:\My DBPRO Games\Edutainment\models\nixanz.x",100
scale object 100, 150,150,150 rem scale obj
position object 100,0,-30,-50 rem position obj
rotate object 100,0,90,0 rem rotate obj
load object "E:\My DBPRO Games\Edutainment\models\nixanz.x",200
scale object 200,150,150,150 rem scale obj
position object 200,3900,-30,4000 rem pos obj
rotate object 200,0,-90,0 rem rotate obj
color backdrop rgb(0,10,210) rem backdrop
make matrix 1,15000,15000,20,20
position matrix 1,-2500,-45,-2500
prepare matrix texture 1,9,1,1
position camera 0,85,-5 rem pos camera
point camera 0,60,60 rem point camera
set camera range 1,3500 rem define range
play music 1 rem play music
loop music 1 rem loop music
rem ****____****____ other oject creation ____****____****
for i= 1 to 50
make object cube i,50 rem make object
scale object i,350,750,360 rem scale
position object i,0+rnd(4000),50,0+rnd(4000) rem position
texture object i,2 rem texture
next i
for j= 141 to 190
make object cube j,50 rem make obj
scale object j,400,675,380 rem scale
position object j,0+rnd(3500),50,0+rnd(3500) rem position
texture object j,5 rem texture
next j
for k= 201 to 230
make object cube k,50 rem make obj
scale object k,300,600,375 rem scale
position object k,0+rnd(2000),50,0+rnd(2000) rem position
texture object k,7 rem texture
next k
for l= 231 to 245
make object cube l,50 rem make obj
scale object l,450,600,400 rem scale
position object l,0+rnd(5000),50,0+rnd(5000) rem position
texture object l,7 rem texture
next l
for m= 261 to 280
make object cube m,50 rem make obj
scale object m,375,600,375 rem scale
position object m,0+rnd(5000),50,0+rnd(5000) rem position
texture object m,7 rem texture
next m
for q= 51 to 72
load object "E:\My DBPRO Games\Edutainment\models\Oil Tank_Directx\tank.x",q
position object q,0+rnd(4000),-21,0+rnd(4000) rem position
scale object q,7,7,7
color object q,rgb(255,0,0)
next q
for h= 102 to 131
make object sphere h,10 rem make object
position object h,0+rnd(4000),-30,0+rnd(4000) rem pos obj
next h
rem ****____****____ game loop with Collision and Motion Section ____****____****
set text font "Comic Sans MC" : set text size 20 : set text to bold : set text transparent
BOOST# = 1000
HEALTH# = 1000
ENERGY# = 1000
timerv = 3600
do
rem store angle
ay# = object angle Y(100)
rem key input
if upkey()=1 then move object 100,-2.45 rem pos move
if downkey()=1 then move object 100,2.45 rem neg move
if leftkey()=1 then ay# = wrapvalue(ay#-2.5) rem neg turn
if rightkey()=1 then ay# = wrapvalue(ay#+2.5) rem pos turn
if BOOST# > 0 and spacekey()=1 rem if boost is > 0 then
move object 100,-3.15 : cdn# = cnd# - 15 rem only then can u boost : - cam dist
endif
if inkey$()="q" then end rem end
rem rotate object
yrotate object 100,ay#
`------------------------------------
cdn# = 8 rem cam dist var
rem \/ get camera to follow \/
set camera to follow object position x(100), object position y(100), object position z(100), object angle y(100), -15, 15, cdn#, 0
rem ****____****____ boost and health section ____****____****
boostout=BOOST#/10
healthout=HEALTH#/10
energyout=ENERGY#/10
text 0,0, "POWER = " + str$(boostout) rem boost on screen
text 335,0, "ENERGY = " + str$(energyout) rem energy on screen
text 530,0, "HEALTH = " + str$(healthout) rem health on screen
center text 320,440, "USE THE ARROW KEYS TO MOVE | SPACEBAR TO BOOST"
center text 320,460, "COLLECT THE GAS CANS FOR POWER | ORBS FOR HEALTH"
if spacekey()=1 and BOOST#>0 then BOOST# = BOOST# - 1 rem decrease boost
if BOOST# < 100 rem if boost is less than 10
dec HEALTH#,1 rem decrease my health
endif
if BOOST# < 200
dec ENERGY#,1
endif
rem ****____****____ collision for buildings section start ____****____****
if object collision(100,200) and ENERGY# > 0
position object 100,x#,y#,z#
dec ENERGY#,1
endif
if ENERGY# = 0
goto NextLevelSequence
endif
for i= 1 to 50 rem for 1 to 50 then
if object collision(100,i) rem if i collide then
HEALTH# = HEALTH# - 1 rem decrese health
position object 100,x#,y#,z# rem disable pass thru
endif
next i rem restart collision
for j=141 to 190 rem for 141 - 190
if object collision(100,j) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next j rem restart collision
for k=201 to 230 rem for 141 - 190
if object collision(100,k) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next k rem restart collision
for l=231 to 245 rem for 141 - 190
if object collision(100,l) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next l rem restart collision
for m=261 to 280 rem for 141 - 190
if object collision(100,m) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next m rem restart collision
for q= 51 to 72 rem for 51 - 80
if object collision(100,q) rem if collsiion
BOOST# = BOOST# + 100 rem boost is increased
exclude object on q rem remov obj from view
endif
next q rem restart collision
for h= 102 to 131 rem for 102 - 131
if object collision(100,h) rem if collsiion
HEALTH# = HEALTH# + 100 rem boost is increased
exclude object on h rem remov obj from view
endif
next q rem restart collision
x# = object position x(100) rem x pos
y# = object position y(100) rem y pos
z# = object position z(100) rem z pos
`*******how to get to the endsection*****
if HEALTH# = 0
goto EndSection
endif
`****____****____ star ttimer section ____****____****
dec timerv,1
timerout=timerv/60
center text 230,0, "Time = " + str$(timerout)
if timerv = 0
goto EndSection
endif
sync
loop
rem ****____****____ next level section start ____****____****
NextLevelSequence:
REM DECLARE VARIABLES
REM SCREEN DISPLAY
delete objects 1,6000
delete objects a,z
delete matrix 1
cls 0
goto NextLevelPlay
end
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
`*************************************************************************************************************************
rem ****____****____MainSection Start____****____****
NextLevelPlay:
load object "E:\My DBPRO Games\Edutainment\models\nixanz.x",100
scale object 100, 150,150,150 rem scale obj
position object 100,0,-30,-50 rem position obj
rotate object 100,0,90,0 rem rotate obj
load object "E:\My DBPRO Games\Edutainment\models\nixanz.x",200
scale object 200,150,150,150 rem scale obj
position object 200,3900,-30,4000 rem pos obj
rotate object 200,0,-90,0 rem rotate obj
color backdrop rgb(0,10,210) rem backdrop
make matrix 1,15000,15000,20,20
position matrix 1,-2500,-45,-2500
prepare matrix texture 1,9,1,1
position camera 0,85,-5 rem pos camera
point camera 0,60,60 rem point camera
set camera range 1,3500 rem define range
play music 1 rem play music
loop music 1 rem loop music
rem ****____****____ other oject creation ____****____****
for i= 1 to 50
make object cube i,50 rem make object
scale object i,350,750,360 rem scale
position object i,0+rnd(4000),50,0+rnd(4000) rem position
texture object i,2 rem texture
next i
for j= 141 to 190
make object cube j,50 rem make obj
scale object j,400,675,380 rem scale
position object j,0+rnd(3500),50,0+rnd(3500) rem position
texture object j,5 rem texture
next j
for k= 201 to 230
make object cube k,50 rem make obj
scale object k,300,600,375 rem scale
position object k,0+rnd(2000),50,0+rnd(2000) rem position
texture object k,7 rem texture
next k
for l= 231 to 245
make object cube l,50 rem make obj
scale object l,450,600,400 rem scale
position object l,0+rnd(5000),50,0+rnd(5000) rem position
texture object l,7 rem texture
next l
for m= 261 to 280
make object cube m,50 rem make obj
scale object m,375,600,375 rem scale
position object m,0+rnd(5000),50,0+rnd(5000) rem position
texture object m,7 rem texture
next m
for q= 51 to 72
load object "E:\My DBPRO Games\Edutainment\models\Oil Tank_Directx\tank.x",q
position object q,0+rnd(4000),-21,0+rnd(4000) rem position
scale object q,7,7,7
color object q,rgb(255,0,0)
next q
for h= 102 to 131
make object sphere h,10 rem make object
position object h,0+rnd(4000),-30,0+rnd(4000) rem pos obj
next h
rem ****____****____ game loop with Collision and Motion Section ____****____****
set text font "Comic Sans MC" : set text size 20 : set text to bold : set text transparent
BOOST# = 1000
HEALTH# = 1000
ENERGY# = 1000
timerv = 2700
do
rem store angle
ay# = object angle Y(100)
rem key input
if upkey()=1 then move object 100,-2.45 rem pos move
if downkey()=1 then move object 100,2.45 rem neg move
if leftkey()=1 then ay# = wrapvalue(ay#-2.5) rem neg turn
if rightkey()=1 then ay# = wrapvalue(ay#+2.5) rem pos turn
if BOOST# > 0 and spacekey()=1 rem if boost is > 0 then
move object 100,-3.15 : cdn# = cnd# - 15 rem only then can u boost : - cam dist
endif
if inkey$()="q" then end rem end
rem rotate object
yrotate object 100,ay#
`------------------------------------
cdn# = 8 rem cam dist var
rem \/ get camera to follow \/
set camera to follow object position x(100), object position y(100), object position z(100), object angle y(100), -15, 15, cdn#, 0
rem ****____****____ boost and health section ____****____****
boostout=BOOST#/10
healthout=HEALTH#/10
energyout=ENERGY#/10
text 0,0, "POWER = " + str$(boostout) rem boost on screen
text 335,0, "ENERGY = " + str$(energyout) rem energy on screen
text 530,0, "HEALTH = " + str$(healthout) rem health on screen
center text 320,440, "USE THE ARROW KEYS TO MOVE | SPACEBAR TO BOOST"
center text 320,460, "COLLECT THE GAS CANS FOR POWER | ORBS FOR HEALTH"
if spacekey()=1 and BOOST#>0 then BOOST# = BOOST# - 1 rem decrease boost
if BOOST# < 100 rem if boost is less than 10
dec HEALTH#,1 rem decrease my health
endif
if BOOST# < 200
dec ENERGY#,1
endif
rem ****____****____ collision for buildings section start ____****____****
if object collision(100,200) and ENERGY# > 0
position object 100,x#,y#,z#
dec ENERGY#,1
endif
if ENERGY# = 0
goto NextLevelSequence
endif
for i= 1 to 50 rem for 1 to 50 then
if object collision(100,i) rem if i collide then
HEALTH# = HEALTH# - 1 rem decrese health
position object 100,x#,y#,z# rem disable pass thru
endif
next i rem restart collision
for j=141 to 190 rem for 141 - 190
if object collision(100,j) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next j rem restart collision
for k=201 to 230 rem for 141 - 190
if object collision(100,k) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next k rem restart collision
for l=231 to 245 rem for 141 - 190
if object collision(100,l) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next l rem restart collision
for m=261 to 280 rem for 141 - 190
if object collision(100,m) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next m rem restart collision
for q= 51 to 72 rem for 51 - 80
if object collision(100,q) rem if collsiion
BOOST# = BOOST# + 100 rem boost is increased
exclude object on q rem remov obj from view
endif
next q rem restart collision
for h= 102 to 131 rem for 102 - 131
if object collision(100,h) rem if collsiion
HEALTH# = HEALTH# + 100 rem boost is increased
exclude object on h rem remov obj from view
endif
next q rem restart collision
x# = object position x(100) rem x pos
y# = object position y(100) rem y pos
z# = object position z(100) rem z pos
`*******how to get to the endsection*****
if HEALTH# = 0
goto EndSection
endif
`****____****____ star ttimer section ____****____****
dec timerv,1
timerout=timerv/60
center text 230,0, "Time = " + str$(timerout)
if timerv = 0
goto EndSection
endif
sync
loop
`**************************************************************************************************************************
`/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
`**************************************************************************************************************************
rem ****____****____MainSection Start____****____****
NextNextLevelPlay:
load object "E:\My DBPRO Games\Edutainment\models\nixanz.x",100
scale object 100, 150,150,150 rem scale obj
position object 100,0,-30,-50 rem position obj
rotate object 100,0,90,0 rem rotate obj
load object "E:\My DBPRO Games\Edutainment\models\nixanz.x",200
scale object 200,150,150,150 rem scale obj
position object 200,3900,-30,4000 rem pos obj
rotate object 200,0,-90,0 rem rotate obj
color backdrop rgb(0,10,210) rem backdrop
make matrix 1,15000,15000,20,20
position matrix 1,-2500,-45,-2500
prepare matrix texture 1,9,1,1
position camera 0,85,-5 rem pos camera
point camera 0,60,60 rem point camera
set camera range 1,3500 rem define range
play music 1 rem play music
loop music 1 rem loop music
rem ****____****____ other oject creation ____****____****
for i= 1 to 50
make object cube i,50 rem make object
scale object i,350,750,360 rem scale
position object i,0+rnd(4000),50,0+rnd(4000) rem position
texture object i,2 rem texture
next i
for j= 141 to 190
make object cube j,50 rem make obj
scale object j,400,675,380 rem scale
position object j,0+rnd(3500),50,0+rnd(3500) rem position
texture object j,5 rem texture
next j
for k= 201 to 230
make object cube k,50 rem make obj
scale object k,300,600,375 rem scale
position object k,0+rnd(2000),50,0+rnd(2000) rem position
texture object k,7 rem texture
next k
for l= 231 to 245
make object cube l,50 rem make obj
scale object l,450,600,400 rem scale
position object l,0+rnd(5000),50,0+rnd(5000) rem position
texture object l,7 rem texture
next l
for m= 261 to 280
make object cube m,50 rem make obj
scale object m,375,600,375 rem scale
position object m,0+rnd(5000),50,0+rnd(5000) rem position
texture object m,7 rem texture
next m
for q= 51 to 72
load object "E:\My DBPRO Games\Edutainment\models\Oil Tank_Directx\tank.x",q
position object q,0+rnd(4000),-21,0+rnd(4000) rem position
scale object q,7,7,7
color object q,rgb(255,0,0)
next q
for h= 102 to 131
make object sphere h,10 rem make object
position object h,0+rnd(4000),-30,0+rnd(4000) rem pos obj
next h
rem ****____****____ game loop with Collision and Motion Section ____****____****
set text font "Comic Sans MC" : set text size 20 : set text to bold : set text transparent
BOOST# = 1000
HEALTH# = 1000
ENERGY# = 1000
timerv = 1800
do
rem store angle
ay# = object angle Y(100)
rem key input
if upkey()=1 then move object 100,-2.45 rem pos move
if downkey()=1 then move object 100,2.45 rem neg move
if leftkey()=1 then ay# = wrapvalue(ay#-2.5) rem neg turn
if rightkey()=1 then ay# = wrapvalue(ay#+2.5) rem pos turn
if BOOST# > 0 and spacekey()=1 rem if boost is > 0 then
move object 100,-3.15 : cdn# = cnd# - 15 rem only then can u boost : - cam dist
endif
if inkey$()="q" then end rem end
rem rotate object
yrotate object 100,ay#
`------------------------------------
cdn# = 8 rem cam dist var
rem \/ get camera to follow \/
set camera to follow object position x(100), object position y(100), object position z(100), object angle y(100), -15, 15, cdn#, 0
rem ****____****____ boost and health section ____****____****
boostout=BOOST#/10
healthout=HEALTH#/10
energyout=ENERGY#/10
text 0,0, "POWER = " + str$(boostout) rem boost on screen
text 335,0, "ENERGY = " + str$(energyout) rem energy on screen
text 530,0, "HEALTH = " + str$(healthout) rem health on screen
center text 320,440, "USE THE ARROW KEYS TO MOVE | SPACEBAR TO BOOST"
center text 320,460, "COLLECT THE GAS CANS FOR POWER | ORBS FOR HEALTH"
if spacekey()=1 and BOOST#>0 then BOOST# = BOOST# - 1 rem decrease boost
if BOOST# < 100 rem if boost is less than 10
dec HEALTH#,1 rem decrease my health
endif
if BOOST# < 200
dec ENERGY#,1
endif
rem ****____****____ collision for buildings section start ____****____****
if object collision(100,200) and ENERGY# > 0
position object 100,x#,y#,z#
dec ENERGY#,1
endif
if ENERGY# = 0
goto EndSectionWin
endif
for i= 1 to 50 rem for 1 to 50 then
if object collision(100,i) rem if i collide then
HEALTH# = HEALTH# - 1 rem decrese health
position object 100,x#,y#,z# rem disable pass thru
endif
next i rem restart collision
for j=141 to 190 rem for 141 - 190
if object collision(100,j) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next j rem restart collision
for k=201 to 230 rem for 141 - 190
if object collision(100,k) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next k rem restart collision
for l=231 to 245 rem for 141 - 190
if object collision(100,l) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next l rem restart collision
for m=261 to 280 rem for 141 - 190
if object collision(100,m) rem if collision
HEALTH# = HEALTH# - 1 rem dec health
position object 100,x#,y#,z# rem pos obj
endif
next m rem restart collision
for q= 51 to 72 rem for 51 - 80
if object collision(100,q) rem if collsiion
BOOST# = BOOST# + 100 rem boost is increased
exclude object on q rem remov obj from view
endif
next q rem restart collision
for h= 102 to 131 rem for 102 - 131
if object collision(100,h) rem if collsiion
HEALTH# = HEALTH# + 100 rem boost is increased
exclude object on h rem remov obj from view
endif
next q rem restart collision
x# = object position x(100) rem x pos
y# = object position y(100) rem y pos
z# = object position z(100) rem z pos
`*******how to get to the endsection*****
if HEALTH# = 0
goto EndSection
endif
`****____****____ star ttimer section ____****____****
dec timerv,1
timerout=timerv/60
center text 230,0, "Time = " + str$(timerout)
if timerv = 0
goto EndSection
endif
sync
loop
`**************************************************************************************************************************
`/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
`**************************************************************************************************************************
PlaneLevelPlay:
load object "E:\My DBPRO Games\Edutainment\models\MIG-21.3ds",100
scale object 100, 25,25,25 rem scale obj
position object 100,0,150,-200 rem position obj
rotate object 100,0,90,0 rem rotate obj
color object 100,rgb(125,20,30)
color backdrop rgb(0,10,210) rem backdrop
make matrix 1,15000,15000,20,20
position matrix 1,-2500,-45,-2500
prepare matrix texture 1,9,1,1
position camera 0,85,-5 rem pos camera
point camera 0,60,60 rem point camera
set camera range 1,3500 rem define range
play music 1 rem play music
loop music 1 rem loop music
rem ****____****____ other oject creation ____****____****
for i= 1 to 50
make object cube i,50 rem make object
scale object i,350,750,360 rem scale
position object i,0+rnd(4000),50,0+rnd(4000) rem position
texture object i,2 rem texture
next i
for j= 141 to 190
make object cube j,50 rem make obj
scale object j,400,675,380 rem scale
position object j,0+rnd(3500),50,0+rnd(3500) rem position
texture object j,5 rem texture
next j
for k= 201 to 230
make object cube k,50 rem make obj
scale object k,300,600,375 rem scale
position object k,0+rnd(2000),50,0+rnd(2000) rem position
texture object k,7 rem texture
next k
for l= 231 to 245
make object cube l,50 rem make obj
scale object l,450,600,400 rem scale
position object l,0+rnd(5000),50,0+rnd(5000) rem position
texture object l,7 rem texture
next l
for m= 261 to 280
make object cube m,50 rem make obj
scale object m,375,600,375 rem scale
position object m,0+rnd(5000),50,0+rnd(5000) rem position
texture object m,7 rem texture
next m
rem ****____****____ game loop with Collision and Motion Section ____****____****
do
if 2*2 = 4 then move object 100,1
rem store angle
ay# = object angle Y(100)
ax# = object angle X(100)
rem key input
if leftkey()=1 then ay# = wrapvalue(ay#-2.5) rem neg turn
if rightkey()=1 then ay# = wrapvalue(ay#+2.5) rem pos turn
if upkey()=1 then ax# = wrapvalue(ax#+2.5) rem neg turn
if downkey()=1 then ax# = wrapvalue(ax#-2.5) rem pos turn
if spacekey()=1 rem if boost is > 0 then
move object 100,5.15 : cdn# = cnd# - 15 rem only then can u boost : - cam dist
endif
if inkey$()="q" then end rem end
rem rotate object
yrotate object 100,ay#
xrotate object 100,ax#
`------------------------------------
cdn# = 8 rem cam dist var
rem \/ get camera to follow \/
set camera to follow object position x(100), object position y(100), object position z(100), object angle y(100), 155, 65, cdn#, 0
rem ****____****____ boost and health section ____****____***
center text 320,440, "USE SPACE TO MOVE | UP/DOWN KEYS TO DIVE"
center text 320,460, "ENJOY THE VIEW | TRY TO DO SOME CRAZY TRICKS"
rem ****____****____ collision for buildings section start ____****____****
for i= 1 to 50 rem for 1 to 50 then
if object collision(100,i) rem if i collide then
position object 100,x#,y#,z# rem disable pass thru
endif
next i rem restart collision
for j=141 to 190 rem for 141 - 190
if object collision(100,j) rem if collision
position object 100,x#,y#,z# rem pos obj
endif
next j rem restart collision
for k=201 to 230 rem for 141 - 190
if object collision(100,k) rem if collision
position object 100,x#,y#,z# rem pos obj
endif
next k rem restart collision
for l=231 to 245 rem for 141 - 190
if object collision(100,l) rem if collision
position object 100,x#,y#,z# rem pos obj
endif
next l rem restart collision
for m=261 to 280 rem for 141 - 190
if object collision(100,m) rem if collision
position object 100,x#,y#,z# rem pos obj
endif
next m rem restart collision
x# = object position x(100) rem x pos
y# = object position y(100) rem y pos
z# = object position z(100) rem z pos
`*******how to get to the endsection*****
if inkey$()="q" then goto EndSection
sync
loop
rem ****____****____ end section start ____****____****
EndSection:
delete objects 1,6000
delete matrix 1
cls 0
center text 320,260, "You LOSE!"
center text 321,261, "You LOSE!"
center text 320,290, "Try AGAIN [Y/N]?"
center text 321,291, "Try AGAIN [Y/N]?"
do
if inkey$()="n" then end
loop
do
if inkey$()="y" then goto GameStart
loop
wait key
EndSectionWin:
delete objects 1,6000
delete matrix 1
cls 0
center text 320,260, "You WIN!"
center text 321,261, "You WIN!"
center text 320,290, "Try AGAIN [Y/N]?"
center text 321,291, "Try AGAIN [Y/N]?"
do
if inkey$()="n" then end
loop
do
if inkey$()="y" then goto GameStart
loop
wait key