It's the first time I'm using drawline and I can't figure how to draw it outside the main loop. I tried setrendertoscreen() and setrendertoimage but I guess I'm missing something. Can someone show a simple example?
function DrawGrid(SysVars as SysVars[])
X as integer
Y as integer
Rows as integer
Cols as integer
TileSize as integer
Rows=SysVars[0].LevelRows
TileSize=SysVars[0].TileSize
Cols=SysVars[0].LevelCols
for Y=0 to Rows*TileSize step TileSize
drawline(1,Y,Cols*TileSize,Y,30,30,30)
next Y
for X=0 to cols*TileSize step TileSize
DrawLine(X,1,X,Rows*TileSize,30,30,30)
next X
endfunction
Thanks!