Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: hellninjas on November 20, 2011, 03:30:23 pm
-
This is a command that has been bugging me for a bit...
I need to make a (test) game that allows the player to jump around on a field (which I can do)...
But I can't get the collisions correct!!
This Pxl-Test( command is the newest thing that im learning...
Could someone give me a good explanation on how or where to use this?
Thanks!
-
pxltest detects pixels near what ever variable you put ex pxl test x+1,y) if your sprite was 1 pixel it would detect if there was a pixel on next to it
-
My pixel is a stick figure about 8 pixels in height and 5 pixels in length, how would this be written out?
-
pixeltest x+5( I believe)and y depends on where you want it to detect
0 copy this and put a 1 where you want it to be detected (this is the last line of your sprite)
0
0
0
0
0
0
0
-
0 copy this and put a 1 where you want it to be detected (this is the last line of your sprite)
0
0
0
0
0
0
1 -This being where his foot is, the rest is to the left :P
-
:(pxl-test(x+8,y+8) or pxl-test(x+3,y+8))
thats what you want, if your sprite has the bottom right foot on the bottom corner of the sprite box
edit:can I see your sprite?, what is the hexcode?
-
[1C141C080C081C22]->Pic0MR Man facing right...
[1C141C0818081C22]->Pic0ML Man facing left...
-
ok I posted a mini little tutorial in the forums