I dont quite understand the code that you gave out.
rem ==================================
` Battling
rem ==================================
`--------
`INCLUDES
`--------
`include the 3d sprite library
#include "sprite.dba"
`include the MatEdit LoadMatrix files
#include "LoadMatrix.dba"
sync on
sync rate 0
hide mouse
autocam off
` ink colors
white=RGB(255,255,255)
blue=RGB(0,128,255)
load music "battle.mid",6
play music 6
loop music 6
load image "flower03.bmp",31
load image "skin.bmp",32
load image "iron01.bmp",33
load object "moth.x",60
scale object 60,2500,2500,2500
load sound "whack.wav",12
set sound volume 12,100
set music volume 6,0
` character
load object "idle.3ds",20
position object 20,6,0,6
scale object 20,.5,.5,.5
texture object 20,32
make object plain 21,5,5
position object 21,7,-1,10
scale object 21,200,100,100
play object 20
loop object 20
make matrix 4,10,10,10,10
prepare matrix texture 4,31,1,1
position matrix 4,0,0,0
position object 60,6,.2,5
position camera 5,.6,4.3
turn camera right 30
l#=50
fl#=50
e#=80
a#=10
spell1=-60
`your attack
repeat
` timer
tim#=tim#+1
sync
position object 60,6,.4,5
if tim#=100 then gosub mothattack
if tim#<100 then gosub box
position object 60,6,.41 ,5
until l#=0 OR e#=0
` if you win or die
end
`moth
mothattack:
sync
` makemoth appear to fly - moth attack pattern
position object 60,6,.3,5
wait 2000
position object 60,6,.4,5.8
play sound 12
wait 1000
l#=l#-5
position object 60,6,.3,5
tim#=tim#-tim#
move#=Move#-1
return
` creating the attack box structure
box:
selectedItem=1
do
if move#=1 then gosub mothattack
if e#=0 then end
`print menu items
if selectedItem=1 then ink blue,0 else ink white,0
text 300,350,"Attack"
if selectedItem=2 then ink blue,0 else ink white,0
text 400,350,"Spells"
if selectedItem=3 then ink blue,0 else ink white,0
text 500,350,"Potions"
if selectedItem=4 then ink blue,0 else ink white,0
text 600,350,"Options"
`select menu items
if upkey()=1 and hold=0 then dec selectedItem : hold=1
if downkey()=1 and hold=0 then inc selectedItem : hold=1
if upkey()=0 and downkey()=0 then hold=0
if selectedItem>4 then selectedItem=1
if selectedItem<1 then selectedITem=4
` to select items
if returnkey()=1
`attack opponent
if selectedItem=1 then e#=e#-a# : sync : move#=1
`spells
if selectedItem=2
text 200,10,"Firey Grave Spell!"
e#=e#-spell1
sync : sync
`clear up after myself
endif
`display information about the game
if selectedItem=3
l#=l#+50
sync : sync
`clear up after myself
endif
`quit the game
if selectedItem=4
end
endif
endif
sync
loop
return
Say i was making a game like this, would i have to use that exact code or something?