Game Development Community

Beta3 Level Editor / Animation[with fix

by Jemand den es nicht gibt · in Torque Game Builder · 05/10/2006 (5:28 am) · 9 replies

Hiya!

Found another bug. When I edit an existing animation I created it disappears. I did the following:

1. Create a new project
2. Create a new tiled image map
3. Create an animation using that image map, frames: 5 4 6 4
4. Place animated sprite in scene
5. Move cursor to the sprite and choose the "Edit animation" button
6. Go to animation preview and change animation time scale
7. Go back
8. Save(same name)

The sprite and the animation in the creation panel disappear and sometimes TGB crashes.

#1
05/10/2006 (8:51 am)
I found another strange animation bug. Sometimes when I close TGB and open it up again, my animations are gone. The sprites are still there but they are invisible and don't have an animation assigned to them.. =/
#2
05/10/2006 (9:57 am)
I had a look at the managed datablock.cs and I found this after a few times of re-created animations...


$managedDatablockSet = new SimSet() {
   canSaveDynamicFields = "1";
   internalName = "Datablocks";

   new t2dImageMapDatablock(fenixImageMap) {
      canSaveDynamicFields = "1";
      imageName = "fenix/data/images/fenix";
      imageMode = "CELL";
      frameCount = "-1";
      filterMode = "SMOOTH";
      filterPad = "1";
      preferPerf = "0";
      cellRowOrder = "1";
      cellOffsetX = "0";
      cellOffsetY = "0";
      cellStrideX = "0";
      cellStrideY = "0";
      cellCountX = "-1";
      cellCountY = "-1";
      cellWidth = "128";
      cellHeight = "128";
      preload = "1";
      allowUnload = "0";
   };
   new t2dAnimatedSprite() {
      position = "4.3251 4.45617";
      size = "16 16";
   };
   new t2dAnimatedSprite() {
      position = "-44.4349 26.8548";
      size = "16 16";
   };
   new t2dAnimatedSprite() {
      position = "-17.7605 0.588744";
      size = "16 16";
   };
};
#3
05/11/2006 (9:04 am)
Here are three script files to switch out in your games/tools/animationEditor/scripts folder.

This should fix your problem, let me know if it does.
#4
05/11/2006 (10:36 am)
@Matthew: Just tried it out... no workies :( I tried out with more than one animation now(worked some more on the game in the meanwhile) and it only appears to happen if I edit the animations that sprites have inside my level... if I edit an animation that is not used by any sprite, that animation doesn't get destroyed. Hope that is of any help... :/

But I have to say that I find it awesome how fast you guys work on solutions- spent some time in the channel yesterday and talked about that problem and someone got to work on it immediately.. thumbs up. :D
#5
05/11/2006 (10:51 am)
:)

hmm... doesn't work? Maybe try running the delete dso .bat file and trying again after you copy those scripts in ?

If still not, feel free to zip up your working directory and send it to me :)

mattl (at) garagegames.com
#6
05/11/2006 (10:56 am)
Yeah I always remove my DSO's like a good Torque coder. ;)

Mail is sent! :D
#7
05/11/2006 (2:31 pm)
Ok here is some more fixed files

Files

This time it should fix it.
#8
05/11/2006 (11:09 pm)
This fixed it! Thanks, that's awesome. :D
#9
05/12/2006 (5:19 am)
Matt,
I still got the case where an animation was deleted when starting TGB (or not saved on shut down?). This happened twice but I can't get it to reproduce regularly (I haven't tried much though). I used the files you posted above.

Cheers,
Michael