@Bri_G OK, I’m going to try again. Here’s another example of what I think you’re after. Since I don’t know how you’re going to create your tiles, I’m just drawing squares on the screen where ever you touch the screen. After you draw what you want, use the x,y,w,h parameters to encompass the area you want to copy. When done, slide the copy parameter and that section of the screen will be copied to the Dropbox folder with the name img. I’m only using one name, but another parameter can be used to enter a name so you can copy other areas. Is something like this closer to what you’re after.
function setup()
parameter.boolean("copy",false)
parameter.integer("x",0,WIDTH,5)
parameter.integer("y",0,HEIGHT,5)
parameter.integer("w",0,WIDTH,5)
parameter.integer("h",0,HEIGHT,5)
scrn=image(WIDTH,HEIGHT)
setContext(scrn)
background(208, 229, 228, 255)
setContext()
end
function draw()
background(40, 40, 50)
setContext(scrn)
if dr then
dr=false
fill(226, 115, 115, 255)
rect(tx,ty,20,20)
end
setContext()
sprite(scrn,WIDTH/2,HEIGHT/2)
noFill()
stroke(255, 0, 0, 255)
strokeWidth(2)
rect(x,y,w,h)
if copy then
copy=false
img=scrn:copy(x,y,w,h)
saveImage("Dropbox:img",img)
print("section copied")
end
end
function touched(t)
if t.state==BEGAN then
tx=t.x
ty=t.y
dr=true
end
end