Little problem with my current space shooter game...this is with the current BlitzPlus V1.37...
I have a "snake" in the game...just a segmented set of sprites that moves around the screen...each segment is a instance of the same type with a Id flag indicateing if it's the snake head or just a body segment...I can get them moveing around and everything, no problem...but I want to draw the sprites in reverse order so that the head is drawn last...
like so:
That won't even compile and I get the "Invalid type conversion" error indicateing at the keyword REPEAT
However this works fine:
So it's not the graphic image handles or type fields...what gives?
I have a "snake" in the game...just a segmented set of sprites that moves around the screen...each segment is a instance of the same type with a Id flag indicateing if it's the snake head or just a body segment...I can get them moveing around and everything, no problem...but I want to draw the sprites in reverse order so that the head is drawn last...
like so:
s.snake = LAST snake REPEAT IF s\idflag = snakebody THEN DRAWIMAGE sbodimg, s\x, s\y ELSE DRAWIMAGE shedimg, s\x, s\y END IF s = BEFORE s UNTIL NOT s
That won't even compile and I get the "Invalid type conversion" error indicateing at the keyword REPEAT
However this works fine:
FOR s.snake = EACH snake IF s\idflag = snakebody THEN DRAWIMAGE sbodimg, s\x, s\y ELSE DRAWIMAGE shedimg, s\x, s\y END IF NEXT
So it's not the graphic image handles or type fields...what gives?