Just a question

Blitz3D Forums/Blitz3D Beginners Area/Just a question

Leigh Bowers screenshot function, just add the line
savescreenshot()
after the flip, you'll probably want to put it on the end of a
if keyhit(xx) then savescreenshot()
Function SaveScreenshot()
iFileNumber = 0
Repeat
iFileNumber = iFileNumber + 1
sFileName$ = "screenshot" + String$("0", 3 - Len(Str$(iFileNumber))) + iFileNumber + ".bmp"
Until Not(FileType(sFileName))
SaveBuffer FrontBuffer(), sFileName
End Function
This is really good as it automatically increments the file number so you can save as many as you want without needing to change the code.

If you use drawimage the background colour is tranparant, this defaults to black (0,0,0) you can set this yourself using maskimage image,r,g,b. A popular background colour is magenta so you'd create your image in a paint program with the background magenta, then in blitz you'd do
myimage=loadimage("myimage.bmp")
maskimage myimage,255,0,255 ;magenta
You have to use drawimage and NOT drawblock for this to work though.