0 Members and 6 Guests are viewing this topic.
:.PROGRAM:[stuff]:prgmPROGRAM2:[more stuff]
.POPprgmPOPSTUPprgmGKSRCIf pxl-Test(X,Y+5)ReturnEndPt-On(20,55,[FFFFFFFFFFFFFFFFPt-On(X,Y,[FF42241800000000End
1) Yes2) If its 4 pixels tall, that means starting at the top left corner, there is a black pixel at Y+0,Y+1,Y+2, and Y+3, and there is white everywhere else. Y+5 will *not* trigger.3) Return does not close the program if you are inside a subroutine, are you inside a subroutine?
.POPprgmPOPSTUPRepeat getKey(15)prgmGKSRCIf pxl-Test(X,Y+4)ReturnEndPt-On(20,55,[FFFFFFFFFFFFFFFFPt-On(X,Y,[FF42241800000000End
..SETUPAsm(EF4645EF7045FDCB00AE
..GETKEYSDispGraphClrDrawIf getKey(1) and (Y<60Y+2->YEndIf getKey(2) and (X>0X-2->XEndIf getKey(3) and (X<88X+2->XIf getKey(4) and (Y>0Y-2->YEnd
Could it be that you are clearing the screen right before you pixel test, and that there hasn't been anything drawn to the screen yet? Try doing the test after the sprite displays. And also, stick with +4, I didn't realize you were trying to detect the *other* sprite
If pxl-Test(X+3,Y+5ReturnEnd
If pxl-Test(X+4,Y+5 or ((pxl-Test(X+3,Y+5ReturnEnd
Why did you add the second pixel test command?
Actually Rect() is smaller, but since you still have the other Pt-On in your program, it still has the Pt-On subroutine and is *also* adding in the Rect() subroutine, making it larger. Also note that size doesn't necessarily have any correlation with speed, but smaller is in general faster.