Author Topic: help with my mario shotgun game!  (Read 2074 times)

0 Members and 1 Guest are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
help with my mario shotgun game!
« on: November 11, 2011, 10:01:56 pm »
Ok so I need some help!
As you see in the screenie, the goomba snaps down to each line. I am trying to fix this by setting it so if the (a-x axis,b-y axis) :(pxl-test(a,b+8)=0 and pxl-test(a+7,b+8)=0) :b+1->b This should work but it isn't. here is my current code....please help me get it to work!

:repeat getkey(15)
:bunch of stuff
:display graph
:bunch of stuff with the getkeys
:end
:pt-change(A,B,pic1B)    //pic1B is the goomba sprite
:A-1->A
:(pxl-test(A,B+8) and pxl-test(A+7,B+8)
:If (pxl-test(A,B=8)=0 and pxl-test(A+7,B=8)=0)
:B+1->B
:End
:pause 20
:pt-change(A,B,pic1B)
:End



If you see the problem(s) please tell me what to fix! I think it's an order problem, but im not sure.
« Last Edit: November 11, 2011, 10:14:01 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: help with my mario shotgun game!
« Reply #1 on: November 11, 2011, 10:09:17 pm »
Hm, are you modifying B at any other part of the program?
In the code you posted, I'm not seeing anything that would add to B (making it move down) so there's something else methinks...
Vy'o'us pleorsdti thl'e gjaemue

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: help with my mario shotgun game!
« Reply #2 on: November 11, 2011, 10:12:49 pm »
Here's the source if you want to see it. It doesn't work though.
« Last Edit: November 11, 2011, 10:13:19 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES: