ok ok i will
u want code rite ?
set display mode 800,600,32
sync on
sync rate 60
REM <<<<<<<< preparations >>>>>>>>>
REM << create menu options text array
dim menutext$(5)
menutext$(1) = "New Game"
menutext$(2) = "Load Game"
menutext$(3) = "Options"
menutext$(4) = "Instructions"
menutext$(5) = "Quit"
REM << set the text options
set text font "Copperplate Gothic"
set text to bold
set text size 20
REM << the images do not cover the screen, so we will blend the main color of them with the background
backdrop on
color backdrop rgb(103,153,128)
REM << load images
load image "mainmenu_bg1.jpg",1
load image "mainmenu_bg2.jpg",2
load image "mmenu_button_off.jpg",3
load image "mmenu_button_on.jpg",4
REM << make and place option button image sprites
for t = 300 to 500 step 50
inc count
sprite count,50,t,3
next t
REM << load sounds
load sound "msover.wav",1
load sound "select.wav",2
REM << load 3D objects
load object "vrspnglogo.x",1
REM << make red texture as image to texture surface logo with
ink rgb(255,0,0),0
box 0,0,1,1
get image 5,0,0,1,1
cls
REM << texture logo with created red image
texture object 1,5
REM << set camera to show logo at top-right corner of screen
position camera -2.5,-1,-9
REM <<<<<<<<<<<<<<<<<<<< MAIN LOOP(nest all code inside this loop) >>>>>>>>>>>>>>>>>>>>>>>>>
repeat
REM <<<<<<<< main menu setup >>>>>>>>>
if frmfocus = 0
REM << main menu will need to be setup after gameplay to make menu objects visible again
if setup$ = "true"
for t = 1 to 5
show sprite t
next t
show object 1
position camera -2.5,-1,-9
point camera -2.5,-1,-9
show mouse
setup$ = "false"
endif
REM <<<<<<<<< main menu loop >>>>>>>>>>
repeat
text 0,0,str$(frmfocus)
REM << paste main menu backgrounds to screen, behind any 3d objects
paste image 1,0,94
paste image 2,464,358
REM << check for mouseover options buttons, on/off effect, also type related option text next to sprite image
space = 300
for t = 1 to 5
REM << check if mouse is within sprite 'box' area
mx = mousex()
my = mousey()
if mx => sprite x(t) and mx =< sprite x(t) + 50 and my => sprite y(t) and my =< sprite y(t) + 49
REM << if mouseover then turn text bright red, use 'on' button image
imgnum = 4
ink rgb(255,0,0),0
REM << compare last sprite mouse was over to current sprite mouseover,if different the play beep sound
if t <> spritenum then play sound 1
REM << record current sprite the mouse is over for comparison on next loop
spritenum = t
REM << check for mouseclick and change frmfocus to equal the current sprite number and play select sound
if mouseclick() = 1
frmfocus = spritenum
play sound 2
REM << clear the screen of all objects
for s = 1 to 5
hide sprite s
next s
hide object 1
cls
REM << the variable below will tell the program that the next form needs to be setup to be playable
setup$ = "true"
endif
else
REM << if mouse not over then turn text dull red, us 'off' button image
imgnum = 3
ink rgb(150,0,0),0
REM << increment spritecheck each time mouse is not over a sprite
inc spritecheck
REM << set spritenum to 0 if spritecheck equals 5, this allows for the last sprite touched to play sound if mouseovered first next
if spritecheck = 5 then spritenum = 0
endif
REM << initialize spritcheck for next loop
if t = 5 then spritecheck = 0
sprite t,50,space,imgnum
REM << print text to right side of image
text 105,space + 12,menutext$(t)
inc space,50
next t
REM << indefinitely spin logo
yrotate object 1,angle
angle = wrapvalue(angle + 1)
sync
REM << when frmfocus is given any new value other than 0, this repeat until loop will end and the rest of the code will be checked
until frmfocus > 0
hide mouse
endif
REM <<<<<<<< end of main menu loop >>>>>>>>
REM <<<<<<<< setup main gameplay >>>>>>>>>
if frmfocus = 1
REM << here is where the program will create your objects before running the repeat loop inside this IF statement
if setup$ = "true" and nosetup$ <> "true"
REM << make gameplay objects
make object box 2,1,1,3:color object 2,rgb(255,0,0)
make object box 3,1,1,3:color object 3,rgb(0,0,255)
make object sphere 4,1:color object 4,rgb(0,500,0)
make object box 5,20,0.1,10:color object 4,rgb(0,225,0)
REM << reset setup$
setup$ = "false"
REM << this variable keeps the program from trying to create already created objects after the first game
nosetup$ = "true"
endif
for t = 2 to 5
show object t
next t
position object 5,0,-0.55,0
REM << initialize some variables;always initialize upon each repeated gameplay!
balla#=90
player1score# = 0
player2score# = 0
REM <<<<<<<<< main gameplay loop >>>>>>>>>>>
repeat
REM << scoring
if ballx#>6 then player2score#=player2score#+1:ballx#=0:ballz#=0:balla#=270
if ballx#<-6 then player1score#=player1score#+1:ballx#=0:ballz#=0:balla#=90
center text 400,100,str$(player1score#) + " ~ " + str$(player2score#)
ballx#=newxvalue(ballx#,balla#,0.3):ballz#=newzvalue(ballz#,balla#,0.3)
REM << basic controls
IF upkey()=1 and player1pos#<3.5 then player1pos#=player1pos#+0.5
IF downkey()=1 and player1pos#>-3.5 then player1pos#=player1pos#-0.5
If ballz#>player2pos# then player2pos#=player2pos#+0.11
If ballz#<player2pos# then player2pos#=player2pos#-0.11
REM << main maths
IF keystate(17)=1 and player2pos#<3.5 then player2pos#=player2pos#+0.5
IF keystate(31)=1 and player2pos#>-3.5 then player2pos#=player2pos#-0.5
if keystate(17)=1 and ballx#<-4 and ballx#>-4.5 then balla#=balla#+8
if keystate(31)=1 and ballx#<-4 and ballx#>-4.5 then balla#=balla#-8
if ballx#>4 and ballx#<4.5 and ABS(player1pos#-ballz#)<1.5 then balla#=360-balla#
if ballx#<-4 and ballx#>-4.5 and ABS(player2pos#-ballz#)<1.5 then balla#=360-balla#
if ballz#>4 or ballz#<-4 then balla#=180-balla#
balla#=wrapvalue(balla#)
REM << camera postion
position object 2,5,0,player1pos#:position object 3,-5,0,player2pos#
position object 4,ballx#,0,ballz#:yrotate object 4,balla#
position camera 0,10,-10:point camera 0,0,0
REM << end game and return back to main menu
if player1score# > 10
cls
for t = 2 to 5
hide object t
next t
REM << initialize the counter;write text to screen
starttime = timer()
repeat
time = counttime(timer(),starttime)
center text 400,300,"YOUR VIRUS HAS DESTROYED THE ENEMY'S HARD DRIVE!"
until time > 5
cls
frmfocus = 0
setup$ = "true"
endif
if player2score# > 10
cls
for t = 2 to 5
hide object t
next t
REM << initialize the counter;write text to screen
starttime = timer()
repeat
time = counttime(timer(),starttime)
center text 400,300,"VIRUS AT 100%! YOUR HARD DRIVE IS WIPED!"
until time > 5
cls
frmfocus = 0
setup$ = "true"
endif
sync
until frmfocus <> 1
endif
REM <<<<<<<<<<<<<<<< END OF MAIN LOOP >>>>>>>>>>>>>>>>>
until frmfocus = 5
end
REM <<<<<<<<<<<<< FUNCTIONS >>>>>>>>>>>>>>>
function counttime(timer,stime)
time$ = str$(timer - stime)
REM << last three numbers of time$ are less than seconds
time = val(left$(time$,len(time$) - 3))
endfunction time
rite ?
thanxs again
today the web site is active www.kinggamers.co.uk WILL BE UP SOON
come and be a member