WANTED!! DEAD OR ALIVE!! ImageMap frame dissapeared when I try to make an animation with it
by Oriol "Orgarus" Garcia · in Torque Game Builder · 09/03/2009 (2:36 am) · 7 replies
Hi to all the community,
I was working peacefully (if it's possible to work peacefully with TGB...) in my project trying to put in a GUI an image of a number (for example, it could be anything you want). My intentions were to change this image when I wanted, as the TGB's GUI system seems to be unable to point to an imageMap and change its frame I decided to make oneframed animations of this imageMap, but... oh! surprise! when I access to the imagemap from the "create animation wizard" it uses its "magic" and one of the frames of my imagemap disappears (to another dimension maybe).
And now the questions: is there a limit of frames in an image map? does TGB hate the number "three" in a strip of numbers (like my imagemap)? have I to call the exorcist?
Thanks for your patience (and mine of course... :) ).
Greetings and good luck to the rest of developers (we need it... ;) ).
I was working peacefully (if it's possible to work peacefully with TGB...) in my project trying to put in a GUI an image of a number (for example, it could be anything you want). My intentions were to change this image when I wanted, as the TGB's GUI system seems to be unable to point to an imageMap and change its frame I decided to make oneframed animations of this imageMap, but... oh! surprise! when I access to the imagemap from the "create animation wizard" it uses its "magic" and one of the frames of my imagemap disappears (to another dimension maybe).
And now the questions: is there a limit of frames in an image map? does TGB hate the number "three" in a strip of numbers (like my imagemap)? have I to call the exorcist?
Thanks for your patience (and mine of course... :) ).
Greetings and good luck to the rest of developers (we need it... ;) ).
About the author
#2
The answer would be "yes and no". I "resolved" the problem as I was laughing (seriously, I could believe what was happening) redoing the image with a size of 160x64 instead of 320x32 which caused that weird behavior in TGB.
The code snippets for these images are:
The "AntiThree" (a.k.a "Raider of the Lost Three"):
<code>
new t2dImageMapDatablock(numerosImageMap) {
imageName = "~/data/images/GUIelementos/caracteres/numeros.png";
imageMode = "CELL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "0";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "10";
cellCountY = "1";
cellWidth = "32";
cellHeight = "32";
preload = "1";
allowUnload = "0";
};
</code>
The other where all the numbers survive (three included, wow!):
<code>
new t2dImageMapDatablock(numeros2ImageMap) {
imageName = "~/data/images/GUIelementos/caracteres/numeros2.png";
imageMode = "CELL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "1";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "-1";
cellCountY = "-1";
cellWidth = "32";
cellHeight = "32";
preload = "1";
allowUnload = "0";
};
</code>
And that's it, at the moment, until the next TGB's "challenge" (I can't wait to it).
Thanks for your interest.
Kind regards.
09/18/2009 (4:56 pm)
Hey William! Glad to read you! Always ready for fight, huh? :)The answer would be "yes and no". I "resolved" the problem as I was laughing (seriously, I could believe what was happening) redoing the image with a size of 160x64 instead of 320x32 which caused that weird behavior in TGB.
The code snippets for these images are:
The "AntiThree" (a.k.a "Raider of the Lost Three"):
<code>
new t2dImageMapDatablock(numerosImageMap) {
imageName = "~/data/images/GUIelementos/caracteres/numeros.png";
imageMode = "CELL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "0";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "10";
cellCountY = "1";
cellWidth = "32";
cellHeight = "32";
preload = "1";
allowUnload = "0";
};
</code>
The other where all the numbers survive (three included, wow!):
<code>
new t2dImageMapDatablock(numeros2ImageMap) {
imageName = "~/data/images/GUIelementos/caracteres/numeros2.png";
imageMode = "CELL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "1";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "-1";
cellCountY = "-1";
cellWidth = "32";
cellHeight = "32";
preload = "1";
allowUnload = "0";
};
</code>
And that's it, at the moment, until the next TGB's "challenge" (I can't wait to it).
Thanks for your interest.
Kind regards.
#3
09/18/2009 (4:57 pm)
Errrr.... how have I to put the <code> tags? (my first time) Ups!
#6
09/19/2009 (2:39 am)
Well, I'm glad you solved it! I made a little 0-9 set at 320x32 and used your datablock, but I saw all my frames. _VERY_ odd to say the least!

Associate William Lee Sims
Machine Code Games
TGB does hate the number "three" and sometimes the letter "A". *HEHE!*
If you are still having problems, could you upload the image you're using the the datablock that was created (you can find it in game/managed/datablocks.cs)?