Posted: 9th Oct 2013 8:47
So, I'm completely stuck. I'm trying to create a brawler style game, and I've gotten a bit lost. Any ideas on how to improve it?
Replace the media with whatever you want.
+ Code Snippet
sync on : hide mouse : sync rate 60
set display mode 1328, 571, 32
set window title " Game Over: After the End"
` music
maximize window
load music "musictestlink.mp3", 1
play music 1
set music speed 1, 125
loop music 1
` sprites
load image "BG_concept_7.3field.jpg", 1
load image "player.png" , 2
load image "playersword.png", 3
x = 0
y = 400
sprite 1, x, 0, 1
sprite 2, x, y, 2
sprite 3, x, y, 3
do
sprite 3,x,y, 3
if returnkey()= 1
hide all sprites
show sprite 1
show sprite 3
else
hide sprite 3
endif
 sprite 2,x,y, 2
if upkey()
 y = y-2
 endif
 if y < 350
 y = 350
 endif
if downkey()
 y = y + 2
 endif
if y > 540
y= 540
endif
if leftkey()
 x = x- 2 
 endif
 if leftkey()
 mirror sprite 2
 endif
 if sprite mirrored(1)=1
 print "the sprite has been mirrored"
 endif
if x < 0
x=0
endif
if rightkey()
 x = x + 2
 hide all sprites
 show sprite 1
 show sprite 2
 endif
 if x> 1300
     x= 1300
ENDIf
if returnkey()= 1
show sprite 3
hide sprite 2
endif
if returnkey()=0
hide sprite 3
show sprite 2
endif
if escapeKey()=1
  end
ENDIF
sync
 loop
Posted: 9th Oct 2013 19:14
+ Code Snippet
sync on : hide mouse : sync rate 60
`window
set display mode 1328, 571, 32
set window title " Game Over: After the End"
maximize window
`music
load music "musictestlink.mp3", 1
play music 1
set music speed 1, 125
loop music 1
` sprites
load image "BG_concept_7.3field.jpg", 1
load image "player.png" , 2
load image "playersword.png", 3
x = 0
y = 400
x2= 0
y2= 410
sprite 1, x, 0, 1
sprite 2, x, y, 2
sprite 3, x, y, 3
sprite 4, x2, y2, 2
do
sprite 4, x2, y2, 2
    if keystate(31)=true
 y2 = y2-4
 endif
 if y2 < 350
 y2 = 350
 endif
if keystate(17)=true
 y2 = y2 + 4
 endif
if y2 > 540
y2= 540
endif
if keystate(32)=true
 x2 = x2- 4
 endif
 if keystate(32)=true
 if sprite mirrored(4)= 0 then mirror sprite 4
 endif
if x2 < 0
x2=0
endif
if keystate(30)= true
 x2 = x2 + 4
 endif
 if  keystate(30)=true
 if sprite mirrored(4)= 1 then mirror sprite 4
 endif
 if x2> 1300
     x2= 1300
ENDIf
sprite 3,x,y, 3
if returnkey()= 1 and sprite mirrored(2)= 0
hide sprite 2
show sprite 3
else
hide sprite 3
show sprite 2
endif
if returnkey()=1 and sprite mirrored(2)=0 and sprite mirrored(3)= 1 then mirror sprite 3
 sprite 2,x,y, 2
if upkey()
 y = y-4
 endif
 if y < 350
 y = 350
 endif
if downkey()
 y = y + 4
 endif
if y > 540
y= 540
endif
if leftkey()
 x = x- 4
 endif
 if leftkey()
 if sprite mirrored(2)= 0 then mirror sprite 2
 endif 
if x < 0
x=0
endif
if rightkey()
 x = x + 4
 endif
 if rightkey()
 if sprite mirrored(2)= 1 then mirror sprite 2
 endif
 if x> 1300
     x= 1300
ENDIf
if returnkey()= 1 and sprite mirrored(2)= 1
hide sprite 2
show sprite 3
if returnkey()=1 and sprite mirrored(2)= 1 and sprite mirrored(3)= 0 then mirror sprite 3
endif
if escapekey()
    end
ENDIF
sync
loop

Sorry about that.
Posted: 11th Oct 2013 20:58
If you include the media in a ZIP or RAR file I'll be glad to try it out.

You can usually make a ZIP file easily by highlighting everything in your folder, right-clicking and selecting "send to compressed (zipped) folder"
Posted: 12th Oct 2013 1:17
Here you go
Posted: 16th Oct 2013 19:04
I did some major upgrades to my original code. Still can't figure out how to jump, or how to add enemies. Help would be greatly appreciated.
+ Code Snippet
sync on : hide mouse : sync rate 500
`globals for window
width= Desktop width()
height= desktop height()
set display mode width, height, 32, 1
set window off
`music
load music "musictestlink.mp3", 1
play music 1
set music speed 1, 125
loop music 1
`sound effects
load sound "OOT_AdultLink_Attack1.wav", 1
` sprites
load image "trees3.png", 4
load image "BG_concept_7.3field.jpg", 1
load image "player.png" , 2
load image "playersword.png", 3
`integers
x= 0
y= 400
x2= 0
y2= 410
x3= x
y3=y
sprite 5, 0, 0, 1
sprite 4, width/10, 0, 1
sprite 1, x, y, 2
sprite 2, x, y, 3
sprite 3, x2, y2, 2
sprite 6, x, y3, 3
do
    sprite 6, x, y3, 3
    if spacekey()
    y3= y- 50
    hide sprite 1
    show sprite 6
    else hide sprite 6
    endif
    if spacekey()=1
    if sprite mirrored(1)= 1 then mirror sprite 6
endif
sprite 3, x2, y2, 2
    if keystate(17)
 y2 = y2-4
 endif
 if y2 < 350
 y2 = 350
 endif
if keystate(31)
 y2 = y2 + 4
 endif
if y2 > (height/25)*24
y2=(height/25)*24
endif
if keystate(30)
 x2 = x2- 4
 endif
 if keystate(30)
 if sprite mirrored(3)= 0 then mirror sprite 3
 endif
if x2 < 0
x2=0
endif
if keystate(32)
 x2 = x2 + 4
 endif
 if  keystate(32)
 if sprite mirrored(3)= 1 then mirror sprite 3
 endif
 if x2> (width/50)*49
     x2= (width/50)*49
ENDIf
sprite 2,x,y, 3
if returnkey()=1 and sprite mirrored(1)= 0 and spacekey()=0
hide sprite 1
show sprite 2
else
hide sprite 2
show sprite 1
endif
if returnkey()=1 and sprite mirrored(1)=0 and sprite mirrored(2)= 1  and spacekey()= 0 then mirror sprite 2
 sprite 1,x,y, 2
if upkey()
 y = y-4
 endif
if y < 350
y= 350
endif
if y > (height/25)*24
y=(height/25)*24
endif
if downkey()
 y = y + 4
 endif
 if leftkey()
 if sprite mirrored(1)= 0 then mirror sprite 1
 endif
if x < 0
x=0
endif
if leftkey()
x= x-4
endif
if rightkey()
x=x+4
endif
 if rightkey()=1
 if sprite mirrored(1)= 1 then mirror sprite 1
 endif
 if x> (width/50)*49
     x= (width/50)*49
ENDIf
if spacekey()
hide sprite 1 : show sprite 6
else hide sprite 6
endif
if returnkey()=1 and spacekey()= 0 then play sound 1
if returnkey()=1 and sprite mirrored(1)= 1 and spacekey()= 0
hide sprite 1
show sprite 2
endif
if returnkey()=1 and sprite mirrored(1)= 1 and sprite mirrored(2)= 0 and spacekey()= 0
 mirror sprite 2
endif
if escapekey()
    end
ENDIF
sync
loop

Just delete the lines for music and trees. I can't get them to place in the right loaction anyway.
Posted: 18th Oct 2013 8:13
You should have posted this in the DBP or Newcomers board, this one is for working code snippets.