Say you want to adjust the z-position of a sprite, just as you would for any 3-d object .... how do you do it? Like this:
ink rgb(255,0,0),0
box 0,0,30,30
get image 1,0,0,30,30,1
dim spritex(10)
dim spritey(10)
dim sizex(10)
dim sizey(10)
for n=1 to 10
sprite n,rnd(600),rnd(600),1
spritex(n)=sprite x(n)
spritey(n)=sprite y(n)
sizex(n)=sprite width(n)
sizey(n)=sprite height(n)
next n
scale#=1
sw=screen width()
sh=screen height()
do
if upkey()=1 then inc scale#,0.01
if downkey()=1 and scale#>0.1 then dec scale#,0.01
if upkey()=1 or downkey()=1
for n=1 to 10
sprite n,sw/2.0+(spritex(n)-sw/2.0)*scale#,sh/2.0+(spritey(n)-sh/2.0)*scale#,sprite image(n)
size sprite n,sizex(n)*scale#,sizey(n)*scale#
next n
endif
loop
Press the up and down arrow keys to change z-depth.
Why would you want to do this? Generally, you wouldn't - if you want to move your sprite in the z-direction, you'd probably be best using a 3-d plane. But there are times, as I have found, where 3-d planes aren't suitable. Transparancy and clipping issues being the reason for me. Or it may be you've written your entire game using sprites, and just want to zoom in/out without converting to planes.