Hi all,
I can't seem to get the SETTRANSPARENCY command to work properly in a FOR-NEXT loop with "GRABSPRITE".
Break-down of my code:
First I'm using SETTRANSPARENCY to set black not to be drawn, then I'm loading my "landsprite.bmp" tileset.
Then I'm using a FOR-NEXT loop to break the tile into three separate sprites using GRABSPRITE. Before this, I use SETTRANSPARENCY again to set the black pixels not to be drawn.
Then I'm drawing a series of these freshly made sprites to "stretch" out my tileset and check for seamlessness. The problem? The black outline is clearly visible...
...but when I draw the original sprite, it's not there!
Full code...
// --------------------------------- //
// Project: 2DGame
// Start: Tuesday, September 27, 2011
// IDE Version: 10.118
//Load our font
SETTRANSPARENCY RGB(0,0,255)
LOADFONT "Media/newFont.png",0
//Load our sprite
SETTRANSPARENCY RGB(0,0,0)
LOADSPRITE "Media/Sprites/landSprite.bmp",0
X=0
FOR A=1 TO 3
DRAWSPRITE 0,0,0
SETTRANSPARENCY RGB(0,0,0)
GRABSPRITE A,X,0,40,40
X=X+40
NEXT
//Set current font
SETFONT 0
//Main loop
WHILE TRUE
//Draw sky-blue background
DRAWRECT 0,0,800,600,RGB(0,150,255)
//Draw a series of tiles
DRAWSPRITE 1,0,600-40
DRAWSPRITE 2,40,600-40
DRAWSPRITE 2,80,600-40
DRAWSPRITE 2,120,600-40
DRAWSPRITE 2,160,600-40
DRAWSPRITE 2,200,600-40
DRAWSPRITE 3,240,600-40
PRINT "A*Little*Epic",800/2-110,0
PRINT "A Game By Jeremy Gardner",800/2-200,25
SHOWSCREEN
WEND
I've tried putting the command in different places within the FOR-NEXT loop but nothing works. Can anyone tell me what's going on please?

EDIT: It definitely seems to be with just the GRABSPRITE command, as I moved my code out of the FOR-NEXT loop and tried it that way, and it still gave me the black out line. :\