Game Development Community

Missing Sequence Error

by Brad Strong · in Artist Corner · 12/10/2006 (11:23 am) · 7 replies

I have created a character called lizard. I made a DTS file that imported fine into Torque. Then I made two animations, without the mesh, each using its own sequence - root, and run. "Root" goes from frame 0 to 20, and "Run" from frame 20 to 40. The config files I set up for them are the same as I did for the original DSQ; I leave all the bones in, also the eye, cam, mount0, etc.

I copied the player.cs file and made one called lizard.cs - here's the first few lines:

datablock TSShapeConstructor(lizardDts)
{
baseShape = "./lizard.dts";
sequence0 = "./lizard_root.dsq root";
sequence1 = "./lizard_forward.dsq run";
sequence2 = "./lizard_root.dsq back";


Since I didn't want to put in too much work until I know if I'm on the right track, I am calling lizard_root from all the sequences from 2 on. For the record I have also tried running this file with just sequence0 and sequence1 being called out, deleting the rest of the file.


I put the texture, the DTS, the two DSQs, all in my lizard directory, run the Torque Show Tool, and the animations work fine.

I run Torque, where I have changed the first coded line of server/scripts/player.cs to read
exec("~/data/shapes/lizard/lizard.cs");
And I put in this line so the lizard shape is called instead of player
shapeFile = "~/data/shapes/lizard/lizard.dts"

The lizard character comes into the game fine, but none of the animations are working. When I check the console, here is the error I get:

starter.fps/data/shapes/lizard/lizard.cs (0): preload failed for lizardDts: Missing sequence starter.fps/data/shapes/lizard/lizard.dts

What am I missing here? Is it okay to use (lizardDTS) in my lizard.cs file? Are there any other files besides the server/scripts/player.cs, and the shapes/lizard/lizard.cs that need a look? I also tried copying my DTS and DSQs to the PLayer folder and renaming them, and stripping out the other animation calls in the player.cs file in that folder, and got the same error, except of course it says "preload failed for playerDTS".

Thanks for any help!

#1
12/11/2006 (5:05 am)
Okay, I found it! I was laughing out loud. I copied the player.cs file and it had correctly spelled the word forward (as in sequence1 = "./lizard_forward.dsq run";) but when I made my dsq in Max, I spelled it "foward"! Man, hopefully, lesson learned. Check spelling first when reviewing syntax!

One warning, the console error (0) had me thinking it was the root sequence file that was messed up; yet I found that by deleting the forward/run sequence from the player.cs file, I could get my player to do the root animation just fine in the game. So that told me to look at the foward/run sequence more carefully. So maybe the console won't get you all the way there, but it definetly can help with clues.
#2
12/11/2006 (6:53 am)
Can you expand a little on how you made this animations, specificity, did you do them all in one time line, or did you copy over frame 0 to each new time line and do one animation at a time?

Thanks.
#3
12/12/2006 (6:37 am)
Sure, but first I have to be clear that I have solved the problem, it was a simple spelling error, as noted above.

I made the animations with a copy of my Max file I used for DTS player shape output, which was set up with the player in a good "ready stance". I simply deleted the mesh, made a root animation from frames 0 to 20, applied a sequence object from the create-helpers-dts objects menu, rmb on this object (which is like a dummy), and made set the start and end of the sequence from 0 to 20. I made sure this sequence object was named "root".

Same thing with the "run" animation, but this time I used frames 20 to 38. When I originally tried to make the run happen from frames 0 to 18, I found that I had overlap between the root and the run, so I figured that I better not overlap the actual frames.

So ultimately when I am done, I will have a dozen or so animations that are made on a biped without the mesh, that do not overlap. Each animation file gets exported separately, to it's own directory, with it's own cfg file.

So the answer to your question is that each animation is done separately, as I have read this allows the most control later in the game. Each one is coming from the root pose and doing it's thing and then ends up back in the root pose, but I am considering changing this as I get deeper into how it all goes together and what animations potentially will follow which other animations.

HTH
#4
12/12/2006 (11:22 am)
So, all animations were done in one time line, but exported to a DSQ for each animation (Sequence)?
#5
12/12/2006 (12:20 pm)
Player_root.max, frames 0~20; dsq dummie named "root, exported to player_root.dsq
player_forward.max frames 0~20 have no animation; 20~38; dsq dummie named "forward", exported to player_forward.dsq

or

player.max in which
dsq dummie named "root", frames 0~20 exported to player_root.dsq
then renamed dsq dummie to "forward", frames 20~38 exported to player_forward.dsq

which set up did you use?
#6
12/12/2006 (12:41 pm)
I built player_root.max from player.max, and animated frames 1-20. Then I built player_foward.max off of player_root.max, and animated frames 20-38. So they are separate files, and in each one, I exported a DSQ from a dummy that was made specially in each file, meaning I did not copy the dummy, not that it should matter too much either way.

So in a sense, they are all on one timeline, because they never use the same frames, but actually they exist in different files. What turned out to be important is the name of the sequence dummies, ("root" and "run"), and the names of the DSQ files themselves (player_root.dsq, player_foward.dsq).

Are you having problems getting animations to show up in the game?
#7
12/12/2006 (12:52 pm)
Yeah I'm having problems with animations too. though it seems like my problem is that I animated all the actions starting at frame 0, which would overlap them.

I have
player_root.max frames 0~30
player_light_attack.max frames 0~45
player_med_attack.max frames 0~90

all different max files, duplicated from the player_ref.max file from which the DTS is exported from.

in game, only the player_root.dsq will play; the movement animations from the ork will play; but not the light_attack and med_attack animations.

If I rename one of the attack animations to player_forward.dsq for example, it plays the attack animation instead of the running.

I'm not sure what's wrong here. but I'll try doing them your way.