I am trying to make a code that will pixelate the screen.
`there is only 1 sprite right now, it is number 20000
x = 1
for x = 1 to 20
paste sprite 20000,0,0
delete sprite 20000
d2pixelate(x)
sprite 20000,0,0,1
set sprite 20000,1,0
size sprite 20000,screen width(),screen height()
sync
sleep 200
next x
function d2pixelate(factor as float)
x#=desktop width()
y#=desktop height()
z#=factor
get image 1,0,0,x#,y#
if sprite exist(1)=1 then delete sprite 1
sprite 1,0,0,1
set sprite 1,1,0
size sprite 1,x#/z#,y#/z#
paste sprite 1,0,0
get image 1,0,0,x#/z#,y#/z#
delete sprite 1
sprite 1,0,0,1
set sprite 1,1,0
size sprite 1,x#,y#
paste sprite 1,0,0
get image 1,0,0,x#,y#
endfunction
the problem is, instead of pixelating more, the screen seems to zoom in on the upper left corner every 200milliseconds. does anyone know what the problem is?
thanks
*´¨;
¸.•´¸.•*´¨; ¸.•*¨;
(¸.•´ (¸.Eviljackson1