Game Development Community

Torque 2d for XNA tutorial error?

by GxG6(Mark-Anthony) · in Torque X 2D · 04/06/2010 (8:02 pm) · 4 replies

ok i went here http://docs.torquepowered.com/torquex/official/
and i'm using the 2d tutorial located there and everything is fine until i do the animation.
when I add a material and save the project it will prompt me to rebuild the solution via XNA.
ok so I do that.
now when I add Another Material, animate it, save the project. it doesn't prompt me to rebuild XNA solution.
so I rebuild the solution through XNA anyway because i figured its suppose to ask me everytime I add materials(i believe). anyway anway when i press the build button. it builds looks like its about to start the game. and nothing happens no error message or anything it just goes back to the code...
So I tried running it through Torque 2d and I get a Game Execution Error. It says my executable file is out of date.Run game express, rebuild the game from XNA to fix this.

the problem is. it doesn't.
so its like late right as i am posting this and I don't know extacly what is wrong but when i look at the solution explorer in XNA the game hasn't updated anything. I've tried added the sprites there manually and it still doesn't build.

I am completely new to Torque by the way and this is my first issue i encountered. any help will be welcomed!

#1
04/06/2010 (8:07 pm)
Try adding the material to the Visual Studio project. then re compile, I don't know why but I have had this issue once in a while as well.
#2
04/07/2010 (7:25 pm)
thanks Henry it worked i added the existing file to the content folder. i really don't know why it doesn't communicate that created it in T2d
#3
04/08/2010 (12:27 pm)
ok now i encountered an error after completing the tutorial it seems theres something wrong with this code

if ((anim.AnimationData == _idle) || (anim.AnimationData == _ready))
     {
         anim.PlayAnimation(_raise);
     }
     else
     {
        anim.PlayAnimation(_jump);
     }
 }

apparently I get a nullreferenceExeption error and it suggest that I use "New" to create object instances. but I'm too dumb to see why this isn't working. I followed the guide the only thing i did was rename the objects with ones i created. maybe an if statement is incorrect for the animation changes? or is the word "jump" a keyword that i can't use?

for those who don't know about the tutorial. the purpose of it is to make an sprite animation that waves at a world object when it gets close and stops when it moves away. in my version i just make a spite jump like a fool when the world object gets close. the error occurs right when the world gets close. the sprite jumps then the program hangs and displays the nullreferenceexception error.

#4
04/09/2010 (4:00 pm)
any clue anyone?