Ok so once again i seek some help, along with my pal John Wu. We have a pretty good game so far, but its a bit sloppy. Anyways, we wanted to make it so if the "Player" goes off the edge, then, it ends the game. we have a floor and everything, but we cant figure this out. The teacher has been trying to figure this out too. So I was thinking an if statement that says when the "player's" distance from the floor is 100 away on the y, then it ends the game. But we still dont have an end section. So unless we can get those in i dont think it will be too easy. Thanks for any help that we get.
-TeknoCyber
REM *****************************************
RemStart
*** TITLE - Galactic Math
*** VERSION - 1.0.0 LAST UPDATED - 11.21.2013
*** 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 2013"
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 OptionsSection
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 MAIN SECTION
REM *** MAIN SECTION HEADER
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
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,1
REM PLAYER
make object sphere 1,50,20,50
color object 1,rgb(255,255,0)
position object 1,15,100,15
texture object 1,1
position camera -200,350,-200
point camera 15,5,15
yrotate camera -90
color backdrop rgb (100,200,255)
texture backdrop 5
do
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)
loop
"It's not death I fear, I fear not being ready for it." -Tristan Green