So I've been working on a brawler style game, like double dragon or final fight, and I'm deadlocked, mainly with jumping. Anybody want to be a good samaritan and help?
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
Use whatever media you want to replace the files. All my stuff is just placeholders.
We all come to a time when we look at the entire picture and think... "Oh dear God, what horrible abomination of a code have I made?"