ImageTile manipulation

BlitzMax Forums/BlitzMax Beginners Area/ImageTile manipulation

@xlsior
Ok an array. Will do some experiments with that.

How does leveldata[x,y] equal a frame number?
DrawImage(fiftytiles,x*50,y*50,leveldata[x,y])

@AngleDaniel
Whew - now that's way over my head but I will study what you said, do some experimenting and learn some more.

I guess the original post should have included my code snippet:
Global fiftytiles:TImage
Global x=60
fiftytiles:TImage = LoadAnimImage ("media/images/tiles.png",126,25,0,50)
Function gettiles()
     For n=0 To 3
          DrawImage fiftytiles,x,120,frame
          x:+131
          frame:+1
     Next
          frame=0
          x=60
End Function

If I can change the DrawImage line to:
DrawImage fiftytiles,x,120,tilearray[n]
then the rest of my problem should be an easy fix. I would change the tilearray in the function that carries out the tile destruction. (I think)
{edit}
Yes, I added this: Global tilearray[]=[0,1,2,3] and changed:
this - DrawImage fiftytiles,x,120,frame
to this - DrawImage fiftytiles,x,120,tilearray[n]
Yea, it's all coming together quickly now.
Thanks a whole bunch folks.