Hey guys, my first article. So, I know quite a few people have difficulty figuring out how to use that Box Mode feature for importing animations. The help files don't really offer massive insight on the subject, merely stating that you have to box your animations and put dots where the hot-spots are. So, this article will tell you exactly how to use Box Mode, and what it can and cannot do. Enjoy! (oh, btw, I put that this is a mini-article in the subject. If it's not by the time I've posted it and it still says Mini Article, point out that I'm an idiot)
BOX MODE - GENERAL LIMITATIONS
So, here's what Box Mode can't handle (also, note to Clickteam, it would be handy if these were fixed ):
- WILL NOT handle sheets with true transparent backgrounds (ie, that checkerboard you see in image programs). That also counts out anything with alpha'd or antialias'd edges.
- WILL NOT handle .png images. I'm not sure why. it just doesn't like them. Save as a 32 or 24-bit Bitmap if you don't want to lose any quality (although it's none too economical on filesize)
- CANNOT import a selection of frames on one sheet (ie, can't use it in conjunction with the Import Selection option). Save each animation as it's own sheet.
BOXING UP YOUR ANIMATION
So, now onto how to box up your animation, ready for importing into MMF2. Start by opening your spritesheet in your preferred image editor, and draw a box that's 2 pixels taller than your tallest sprite and 2 pixels wider than your widest sprite (so that every sprite will fit comfortably inside one on the boxes without overlapping the edges), and a different colour to the background.
Now, copy the box and put them around each sprite on the page, and line them all up with at least one pixel gap between each box. I've bolded that because that's a common tripping up point, it's easy to think that it'll work with boxes all right next to each other like a grid. It won't, unfortunately.
The sheet on the left would import correctly. The sheet on the right would make MMF2 cry. (Ignore the large gap in the boxes beneath the sprite, they're sprites for a game I'll be working on soon, and being clouds, they float a little)
Now, one of the neater abilities of Box Mode is that you can have the action point and hotspot set as you import them. To do this, on your image, colour one pixel in the top and left edges for the Hot Spot, and one pixel in the bottom and right edges for the Action Point.
IMPORTING IT INTO TGF2/MMF2
Right, you have your spritesheet set up with all it's box necessities. Time to import it! Load the file in the import options as usual, and tick Box Mode. Now, set the Transparent Colour to the colour of the background of your image.
Also tick Import As Animation (otherise it'll only import the first frame). Don't worry about the buttons on the right that activate when you press this. Ignore that From Frame/To Frame claims that it'll import to just frame one, it won't. Hit OK, and, if all was done correctly, your animation will appear across a series of frames, with the hotspots and actives in their relevant places (if you set them). And, you just saved yourself a lot of work!
So, that's it. That's all I've got. You'll find that box mode can be quite useful once you know how to use it.
Not a very long article, but I hope it helps!