Game Development Community

Many Models, 1 Animation

by Riko Nagatama · in Artist Corner · 07/27/2009 (4:19 am) · 3 replies

If there are 2 character (char1 & char2) and they have same animation (e.g. run, dance, etc), how to make just 1 file animation?

So if there are 20 characters with same animation, I only have to create 1 animation.


Thanks

#1
07/27/2009 (5:23 am)
Animation files[DSQ] are loaded into DTS shape via a datablock construct: the TSShapeConstructor.

The very name 'Constructor' at the end of the datablock name suggests you are assembling separate files and...you are. The Constructor datablock contains a baseShape[DTS]file assignment, and an indexed array of all the sequences you intend to load into the DTS shape. For default Player behavior; the first 10 DSQ sequences MUST be in a specific order.

Go to the data/shapes/player folder and see the 'second' player.cs file. This is the TSShapeConstructor datablock. This file shows how to setup a DTS with DSQ sequences, and you keep using the same DSQ files for every DTS shape that you want running the 'same' animation.

Search out, TSShapeConstructor, and see some of the Posting results. Good luck!

Rex
#2
07/28/2009 (6:12 pm)
@Rex

Thanks Rex, I understand how it works now. So I need to create 2 player.cs file that contain different DTS, but same animation sequence..

But here comes another problem :
I created 2 DTS file (player1.dts and player2.dts) and 1 DSQ(player_root.dsq). But it seems that the player2 can't load the player_root.dsq.

Note:I created player_root.dsq from player1.dts.

Are there any conditions required to share animations? Like the meshes must have same name, or the bounding box must be the same size, or something like that?
#3
07/28/2009 (6:24 pm)
The "bones" have to be the same, that is the "skeleton". Also try exporting the new player with all of the animations included, and then deselect them and export again.

And make sure that you are loading the player2.cs files. You'll need 2, one like in scriptsandassets/server/player.cs that is "exec" through game.cs, and one like in scriptsandassets/data/shapes/players/player.cs which has all of the animations listed.

And you CANNOT just drop your player2 in from the editor, you have to SCRIPT a spawn. See game.cs for spawning, it should be right near the bottom. (I think, it's been a while since I've done this).