Game Development Community

Multiple imageMaps within a single animation?

by Orion the Hunter · in Torque Game Builder · 08/20/2012 (9:08 am) · 2 replies

Hello,

I was wondering if it was possible to have a single animation use multiple image maps. The reason is, I'm making a random game advice board, and each animation frame has a different tip. If I made a single image with all of the advice put together, it would exceed the maximum image size for TGB. I imagine it would look like this:

new t2dImageMapDatablock( SomeState )
{
    imageName1 = "./data/images/Dragon/1.png";
    imageName2 = "./data/images/Dragon/2.png";
    imageName3 = "./data/images/Dragon/3.png";
    imageName4 = "./data/images/Dragon/4.png";
    imageMode = "CELL";
    frameCount = "-1";
    filterMode = "SMOOTH";
    filterPad = "0";
    preferPerf = "1";
    cellRowOrder = "1";
    cellOffsetX = "0";
    cellOffsetY = "0";
    cellStrideX = "0";
    cellStrideY = "0";
    cellCountX = "-1";
    cellCountY = "-1";
    cellWidth = "170";
    cellHeight = "170";
    preload = "1";
    allowUnload = "0";
};
I know my example is rather crude and not their yet but could someone help me out?

Many thanks,

~AJPCEO

#1
08/20/2012 (12:12 pm)
Under the "Create" tab of the builder, use "Create a new linked image map" (it's next to the "Create a new image map" and "Create a new animation". This will link previously created image maps (the individual files). Once linked, you can build an animation out of it.

You were warned in the past that this isn't very efficient. I think that's still true, but I did an explosion with 100 frames and it seemed to be okay.
#2
08/22/2012 (5:09 pm)
Hello William,

Thank you very much! That worked for me.