3477
« on: March 31, 2011, 07:23:21 am »
So, I was trying to make a platformer shoot'em up game, but I'm stuck here.
1. This guys should aim up when I press up, but it never happens.
2. How do I make him shoot?(Not 1 bullet at a time)
Here's the code and program:
prgmMSLUG is the executable program.
:.SPRITELIB
:
:.PROTAGONIST
:.FRONTBUFFER
:.RIGHT1
:[00000F1F1F13110E→Pic1
:[0000804000003F3F1F1F1F1117171B1FC0C0300000000080
:.RIGHT2
:[00000F1F1F13110E0000804000003F3F1F1F1F11254CD271C0C0300000E0C080
:.LEFT1
:[000001020000FCFC0000F0F8F8C8887003030C0000000001F8F8F888E8E8D8F8
:.LEFT2
:[000001020000FCFC0000F0F8F8C8887003030C0000070301F8F8F888A4324B82
:.JUMPRIGHT
:[00000F1F1F13110E0000804000003F3F1F1F1F10E6C9F080C0C030C020987020
:.JUMPLEFT
:[000001020000FCFC0000F0F8F8C8887003030C0304190E04F8F8F80867930F01
:.LOOKUPRIGHT1
:[30303F3F33331D0E00008040000000001F1F1F1117171B1F0000000000000080
:.LOOKUPRIGHT2
:[30303F3F33331D0E00008040000000001F1F1F11254CD271C0C0300000E0C080
:.LOOKUPLEFT1
:[00000102000000000C0CFCFCCCCCB8700000000000000001F8F8F888E8E8D8F8
:.LOOKUPLEFT2
:[00000102000000000C0CFCFCCCCCB87003030C0000070301F8F8F888A4324B82
:
:.BACKBUFFER
:.RIGHT1
:[00000F1F001F1F0E→Pic2
:[0000804000003F3F10101F1F1D1D1B1F3030000000000080
:.RIGHT2
:[00000F1F001F1F0E0000804000003F3F10101F1F3F7FF3713030300000E0C080
:.LEFT1
:[000001020000FCFC0000F0F800F8F8700C0C0C00000000010808F8F8B8B8D8F8
:.LEFT2
:[000001020000FCFC0000F0F800F8F8700C0C0C00000703010808F8F8FCFECF8E
:.RIGHTJUMP
:[00000F1F001F1F0E0000804000003F3F10101F1FFFF9F080303030C0E0F87020
:.LEFTJUMP
:[000001020000FCFC0000F0F800F8F8700C0C0C03071F0E040808F8F8FF9F0F01
:.LOOKUPRIGHT1
:[30303F3F3E3F1302000080400000000011111F1F1D101B1F0000000000000080
:.LOOKUPRIGHT2
:[30303F3F3E3F1302000080400000000010101F1F3F7FF3713030300000E0C080
:.LOOKUPLEFT1
:[00000102000000000C0CFCFC7CFCC84000000000000000018888F8F8B8B8D8F8
:.LOOKUPLEFT2
:[00000102000000000C0CFCFC7CFCC8400C0C0C00000703010808F8F8FCFECF8E
:
:.PROJECTILE
:[0000181818180000→Pic3
:.MSLUG
:prgmθA
:
:0→A→X→B→C
:48→Y
:
:Repeat getKey(15)
:
:ClrDraw
:ClrDrawr
:
:sub(DS,X,Y
:
:.WALKING
:If getKey(3)
:X+1→X
:If B
:4→A
:End
:!If B
:!If A
:1→A
:Else
:0→A
:End
:End
:If getKey(4)
:If A≠6
:6→A
:Else
:7→A
:End
:End
:End
:
:If getKey(2)
:X-1→X
:If B
:5→A
:End
:!If B
:If A≠2
:2→A
:Else
:3→A
:End
:End
:If getKey(4)
:If A≠8
:8→A
:Else
:9→A
:End
:End
:End
:
:.JUMP
:If getKey(54) and (B=0
:1→B
:If A≤1
:4→A
:Else
:5→A
:End
:End
:
:If B≠0 and (B≤6
:Y-4→Y
:B+1→B
:End
:If B=7
:Y+1→Y
:C+1→C
:End
:If C=24
:0→B→C
:End
:
:
:DispGraphrr
:End
:
:Lbl DS
:Pt-On(r1,r2,32*A+Pic1
:Pt-On(r1,r2,32*A+Pic2)r
:Pt-On(r1+8,r2,32*A+Pic1+8
:Pt-On(r1+8,r2,32*A+Pic2+8)r
:Pt-On(r1,r2+8,32*A+Pic1+16
:Pt-On(r1,r2+8,32*A+Pic2+16)r
:Pt-On(r1+8,r2+8,32*A+Pic1+24
:Pt-On(r1+8,r2+8,32*A+Pic2+24)r
:Return