DDDD̔ɔɔaaaa11111133 Ѝ Ѝ Ѝ ̀ ؍ Ȍ ؍ ؍ ؍ ݈ ݈ ݈ ݈ ݈ Ѝ ݈ Ѝ ݈ n -- title: MEGAMAN Demo -- author: LuaNX -- desc: Megaman Test -- script: lua z=0 t=0 p={ x=52, y=48, xx=0, yy=0, xv=0, yv=0, sh=0, sl=0, st=1, exists=0, t=0, i=0, ii=0, d=0, } b={ x1=0, x2=0, x3=0, y1=0, y2=0, y3=0, d1=0, d2=0, d3=0, t1=0, t2=0, t3=0, } wall={} --wall types wall[2]=1 --1=solid wall[3]=1 --2=death wall[1]=2 function tcheck(x,y) return wall[mget(x,y)] end function bullet(x,y,d) if b.t1==0 then b.x1=x b.y1=y b.d1=d b.t1=64 p.sh=12 sfx(0,50) elseif b.t2==0 then b.x2=x b.y2=y b.d2=d b.t2=64 p.sh=12 sfx(0,50) elseif b.t3==0 then b.x3=x b.y3=y b.d3=d b.t3=64 p.sh=12 sfx(0,50) end end function player() if btn(2) then p.xv=-0.6 p.d=1 elseif btn(3) then p.xv=0.6 p.d=0 else p.xv=0 end if btnp(4) and p.st==1 then p.yv=-1.7 end if btn(4)==false and p.yv<-0 then p.yv=-0 end if btnp(5) then bullet(p.x,p.y,p.d) end p.x=p.x+p.xv p.y=p.y+p.yv if p.xv>4 then p.xv=4 elseif p.xv<-4 then p.xv=-4 end if p.yv>4 then p.yv=4 elseif p.yv<-4 then p.yv=-4 end p.xx=math.floor((p.x+4)/8)*8 p.yy=math.floor((p.y+4)/8)*8 --Right Check: if tcheck(p.xx/8+1,p.yy/8)==1 then if p.x>p.xx+2 then p.x=p.xx+2 end end --Left Check: if tcheck(p.xx/8-1,p.yy/8)==1 then if p.x