Game Development Community

good on paper::Animation Datablocks Invalid(SOLVED!!?!!)

by rennie moffat · in iTorque 2D · 05/11/2011 (10:27 am) · 41 replies

Hi,
I am getting this message. I dont get it. The animation in question is in my level datablock and managed datablock. Anyone ever come across this before?

t2dAnimationController::playAnimation() - Invalid t2dAnimationDatablock datablock

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.

Page «Previous 1 2 3 Last »
#1
05/11/2011 (10:32 am)
Can you post the code you use to play the animation?
#2
05/11/2011 (10:38 am)
Well the thing is Michael, is that it worked. I made some edits to sprites, and it worked but the behavaiors were acting up. So I just decided to create a new scene and build it up, bit by bit and the one main animation, will not appear. It still appears on the original level.

For now, instead of starting a new scene I will just deconstruct the old one.


:S




#3
05/11/2011 (10:46 am)
I just solved the issue I was having with the behavior, tho I imagine the odd thing i posted for is still happening. but not of real concern anymore.


Thanks.


#4
05/11/2011 (6:15 pm)
Do you have the animation datablock in your level datablocks file? Is the datablock file created? A missing animation datablock will cause that error message. By default, Torque will load a datablock file with the same name as the .t2d file. For example, MyLevel.t2d will load MyLevel_datablocks.cs.
#5
05/11/2011 (6:27 pm)
the managed and level datablocks are legit.


Not sure, obviously something is happening. It currently does not matter tho as I have it working on another level. I should close this thread. Thanks.
#6
05/13/2011 (2:45 pm)
Hi, good news everybody! I added some animations to the level and now.. They Wont Appearrr!!! yeehhhh.




call to animation, ex 1.
$Enemy.playAnimation(mcGeeDefendAnimation);
//$Enemy = %this.owner;
datablock for mcGeeDefendAnimation (managed)
new t2dImageMapDatablock(mcGeeCellsImageMap) {
      imageName = "~/data/images/mcGeeCells.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 = "128";
      cellHeight = "256";
      preload = "1";
      allowUnload = "0";
      compressPVR = "0";
      optimised = "0";
      force16bit = "0";
   };
   new t2dAnimationDatablock(mcGeeDefendAnimation) {
      imageMap = "mcGeeCellsImageMap";
      animationFrames = "3";
      animationTime = "1";
      animationCycle = "1";
      randomStart = "1";
      startframe = "0";
      pingPong = "0";
      playForward = "1";
   };
level datablock
new t2dAnimationDatablock(mcGeeDefendAnimation) {
      imageMap = "mcGeeCellsImageMap";
      animationFrames = "3";
      animationTime = "1";
      animationCycle = "1";
      randomStart = "1";
      startframe = "0";
      pingPong = "0";
      playForward = "1";
   };



#7
05/15/2011 (8:09 am)
Is mcGeeCellsImageMap in the level datablocks file?
#8
05/15/2011 (8:26 am)
see the last chunk i posted? Yep.



I am, unless you have any other suggestions, going to simply rebuild the level. Since I am also having similar (only in weirdness factor) in deploying to my device, a project rebuild might be the call? Not sure, anyhow that is what I am thinking.


#9
05/15/2011 (8:29 am)
I have to take you at literal value, which is why I asked. You list both datablocks for the managed script, but only show the animation datablock for your level.
#10
05/15/2011 (9:45 am)
My apologies again Michael. I had an old imageMap I had updated and changed the name to use as the animation. I thought it was in there. I was wrong. Thanks!!!!!

You have made my Sunday that much better. Now, if you can just solve my XCode issues I will give you the biggest hi five one man has ever seen.


#11
05/15/2011 (9:47 am)
I'm stumped on your Xcode problem
#12
05/15/2011 (9:48 am)
Yah weird.
I will just try and create a new project. I have been copying over in large chunks (behaviors, images...) I am going to break it down even smaller. Pain in the ass but oh well. Thanks.
#13
05/15/2011 (9:49 am)
Quick question…are you using source control yet? It would save you a lot of time of rebuilding projects.
#14
05/15/2011 (9:59 am)
No. What is source control?
#16
05/15/2011 (10:26 am)
So would saving a different version at the end of each day be significant?


How do you apply this?
#17
05/15/2011 (10:30 am)
When you make a change on a file that is under source code, it is a modification. You commit modifications to the repository. That is called a revision. You can revert modified files back to a working copy (last revision), delete files and update them from the repository. You can even revert back beyond the last revision. So when stuff breaks, rather than constantly recreating a project or starting over, you just revert.
#18
05/15/2011 (10:34 am)
Thing is Michael is that I never touch source code. I only write behaviors and write in the commonXL as well as the game.cs. Never do I (knowingly) go into the source code.


#19
05/15/2011 (10:35 am)
Every file goes under source control. Scripts, project files, art…everything.
#20
05/15/2011 (10:36 am)
oh. Ok. Well I will start saving versions as I progress.


Thanks for the tip.


Page «Previous 1 2 3 Last »