Wow! Thank you for your help, Tone Dialer.
I've created this code now, to take a picture of a fish.
// Project: picturegame
// Created: 2021-01-10
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "picturegame" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 0 )
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
LoadImage (1, "Frame.png")
CreateSprite (1, 1)
SetSpriteDepth (1, 1)
LoadImage (2, "CenterFrame.png")
CreateSprite (2, 2)
SetSpriteOffset (2, 15, 15)
SetSpriteDepth (2, 1)
LoadImage (3, "fish.png")
CreateSprite (3, 3)
SetSpriteDepth (3, 20)
SetSpritePosition (3, 300, 300)
NewPic as Integer = 4
NewSprite as Integer = 4
do
MouseX = GetRawMouseX ()
MouseY = GetRawMouseY ()
FishX = Random (100, 900)
FishY = Random (50, 600)
SetSpritePositionByOffset (2, MouseX, MouseY)
SetSpritePosition (1, MouseX - 150, MouseY - 150)
if GetRawMouseLeftPressed () = 1
Render ()
GetImage (NewPic, MouseX - 150, MouseY - 150, 300, 300)
ClearScreen ()
CreateSprite (NewSprite, NewPic)
SetSpritePosition (NewSprite, NewSprite*50, 200)
SetSpriteDepth (NewSprite, 1)
SetSpritePosition (3, FishX, FishY)
endif
if GetImageExists (NewPic) = 1
NewPic = NewPic + 1
NewSprite = NewSprite + 1
endif
Sync()
loop
Now my issue is, the image created includes the "frame" and "centerframe" sprites, but I'd ideally like the new image to not contain those- so, I'd like it to "GetImage" but only at a certain Sprite Depth (everything beyond 1.)
I think there might be a way in the "render" portion to only render at a certain depth, and then get an image from there, but I'm not sure how...