I have a tileset in an active picture object, and I want to resize the APO so that I can only see a 16x16 part of the tileset.
But when I resize the APO to 16x16 it automaticly resizes the whole tileset, how can I fix this?
Am I right to assume you trying to make some kind of tile-based game, which uses an external tileset file?
If so, this is how I go about it:
1.) Create an Overlay object, containing your Tileset image.
2.) Create a second Overlay, the size of a single tile (16x16).
3.) Use the function "Paste Overlay into Overlay", to paste an individual tile from the first Overlay into the second.
4.) Save the contents of the second Overlay as "Temp.bmp" or something.
5.) Load "Tamp.bmp" into an Active Object, using Animation -> Load Frame.
6.) Repeat for other tiles...
You can easily fastloop the whole process at the start of the frame, so it will save each tile into a different animation frame of an Active Object. You can then load them instantly, and paste them into the background etc.
If your tileset is stored externally, which I assume it is, then you don't even have to do all of that.
Load up your tileset into the active picture object with out any resizing. Then whenever you want to create a tile on screen from your tileset use the active picture's command "create backdrop object." This command will allow you to specify: the X and Y position of the created backdrop, the X and Y position of the backdrop on the tileset, and the height and width of the backdrop on the tileset.
This way you can paste the tiles quickly without having to save individual files back to the system, and keep from hammering the hard drive.
Now if you want animated tiles you will have to use the "animated picture object" I haven't used this one yet so I can't explain it.
I don't know about Sketchy's overlay technique (I'll look into it), but what UrbanMonk says is right.
Then, with some will, you can add rotated and flipped tiles features.
The X & Y coordinates changes though, and that's the hard part.
While your at it, why not also have foreground. Just use a second layer, and you've got a pretty complex level editor.
1 is my tileset.
I want the APO to only show the first (16x16) tile, like 2.
When I load the tileset with an APO that is already 16x16, the APO will change size to the size of the image.
If I do resize in the events the APO will resize the image it has inside, see 3 for that effect.
I understand your question, but:
1.) I'm not sure it's possible.
2.) I think there's going to be a better way to achieve whatever end goal you have in mind.