hi I was wondering how I could go into a new section because my game has an enemy character in which a math problem comes out. I want to do it when the enemy disapers which is pressing the "a" key since it gets rid of the enemy. I want to do it so that when that happens it goes into a new section with new different maps and characters. All help is appreciated!
REM *****************************************
RemStart
*** TITLE - Galactic Math
*** VERSION - 1.3.0 LAST UPDATED - 1.30.2014
*** DEVELOPER - Tristan Green & John Wu
*** COPYRIGHT - Nothing Yet
*** DATE CREATED - 11.22.2013
***
RemEnd
REM *** START SYSTEM SETUP SECTION
hide mouse
autocam off
REM *** STOP SYSTEM SETUP SECTION
REM *****************************************
REM *****************************************
REM *** START INTRO SECTION
REM *** INTRO SECTION HEADER
REM DECLARE VARIABLES
REM SCREEN DISPLAY
cls 0
load bitmap "E:\Edutainment Game\images\Galactic-Math.bmp"
ink rgb(255,255,255),0 : set text font "arial" : set text size 14 : set text to bold : set text transparent
center text 320,420,"Developed by Tristan Green and John Wu"
center text 320,434,"Copyright © Nothing 2014"
REM LOAD MUSIC
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** INTRO SECTION LOOP
do
REM SCREEN DISPLAY
REM CONTROL INPUT
if Keystate(scancode())=1 then gosub MoonSection
REM REFRESH SCREEN
sync
loop
REM *** END INTRO SECTION
REM *****************************************
REM *****************************************
REM *** START OPTIONS SECTION
REM *** OPTIONS SECTION HEADER
OptionsSection:
REM DECLARE VARIABLES
REM SCREEN DISPLAY
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
REM *** OPTIONS SECTION LOOP
REM CONTROL INPUT
REM REFRESH SCREEN
REM *** END OPTIONS SECTION
REM *****************************************
REM *****************************************
REM *** START MOON SECTION
REM *** MOON SECTION HEADER
MoonSection:
REM DECLARE VARIABLES
MyScore = 0 : rem Starting score is 0
REM SCREEN DISPLAY
cls 0 : backdrop on
REM LOAD IMAGES
load image "E:\Edutainment Game\images/moon_floor.png",2
load image "E:\Edutainment Game\images/starfield-6.jpg",5
load image "E:\Edutainment Game\images/16032727.jpg",1
load image "E:\Edutainment Game\images/Coin.bmp",20
REM OBJECT CREATION
REM FLOOR
Make object box 2, 500,100,5000
position object 2, -5,-10,-5
color object 2,rgb(155,155,155)
texture object 2,2
scale object texture 2,1,10
REM PLAYER
make object sphere 1,50,20,50
color object 1,rgb(255,255,0)
position object 1,15,100,-1000
texture object 1,1
REM NOB #1
make object sphere 10, 50,20,50
position object 10, 15,90,200
REM COINS
make object cube 20 , 25
position object 20 , 15, 100, 70
texture object 20, 20
REM LOAD MODELS
REM SET COLLISIONS
REM SET CAMERA
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** MOON SECTION LOOP
position camera -200,350,-300
point camera 15,5,15
yrotate camera -90
texture backdrop 5
do
if object collision (1,20) then MyScore = MyScore + 10
if object collision (1,20) then position object 20, 15, 1000, 50
center text 40,10, "Score:"+str$(MyScore)
xrotate object 20, object angle x (20)+0.2
yrotate object 20, object angle y (20)+0.2
yrotate object 1, rotation# REM rotate the object
set camera to follow object position x(1), object position y(1), object position z(1), object angle y(1), 190, 290, 100, 0
if upkey() then move object 1,1
if downkey() then move object 1,-1
if rightkey() then rotation#=rotation#+.25 REM control the rotation
if leftkey() then rotation#=rotation#-.25 REM control the rotation
if object collision(1,2)=0 then inc FallSpeed#,.015 else FallSpeed#=0
if spacekey() then move object up 1,2
position object 1,object position x(1),object position y(1)-FallSpeed#,object position z(1)
scroll object texture 1,0,0.00050
if object position y(1)<-100 then position object 1, 15,100,-1000
ink rgb(0,255,0),0
if object collision (1,10) then center text 320,420, "12x12"
if object collision (1,10) then center text 320,440, "[A]144 [B]24 [C]140"
if object collision (1,10) then
if Inkey$()="a" and object collision (1,10)
MyScore = MyScore + 10
position object 10, 15,900,200
endif
if Inkey$()="b" and object collision (1,10)
MyScore = MyScore = 0
endif
if Inkey$()="c" and object collision (1,10)
MyScore = MyScore = 0
endif
if MyScore = 20
for x = 1 to 20
if object exist(x) = 1 then delete object x
next x
gosub RocketSection
endif
loop
REM *** STOP MOON SECTION
REM *****************************************
REM *****************************************
REM *** START ROCKET SECTION
REM *** ROCKET SECTION HEADER
RocketSection:
MyScore = 0
REM LOAD IMAGES
load image "E:\Edutainment Game\images/black.bmp",21
REM OBJECT CREATION
sync
REM FLOOR
Make object box 22, 50,100,500
position object 22, 10,30,10
color object 22,rgb(155,155,155)
texture object 22,2
scale object texture 22,1,10
REM PLAYER
make object sphere 1,50,20,50
color object 1,rgb(255,255,0)
position object 1,15,100,-1000
texture object 1,1
REM LOAD MODELS
REM SET COLLISIONS
REM SET CAMERA
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
REM *** ROCKET SECTION LOOP
position camera -200,350,-300
point camera 15,5,15
yrotate camera -90
texture backdrop 21
do
loop
REM *****************************************
REM *** START END SECTION
REM *** END SECTION HEADER
EndSection:
REM DECLARE VARIABLES
REM SCREEN DISPLAY
cls 0
center text 320,240,"LOL YOU FELL LOSER!!! Play Again [Y/N]?"
REM SOUND EFFECTS
REM SPECIAL EFFECTS
REM REFRESH SCREEN
sync
REM *** END SECTION LOOP
do
if scancode()=0 then exit
loop
do
REM CONTROL INPUT
if Inkey$()="y"
gosub OptionsSection
endif
if Inkey$()="n"
cls : end
endif
REM REFRESH SCREEN
sync
loop
end
REM *** STOP END SECTION
REM *****************************************
Hasty