Game Development Community

Animation for Multiple AI models

by Allan Brown · in Technical Issues · 10/11/2005 (3:18 am) · 8 replies

Hi,

Im possibly missing something really obvious hre (dont you hate it when posts start like that) but Im unable to get more than one diffrent AI model to animate in Torque. The diffrent models spawn ok but just move about like statues. Is there a checklist of things I should be making sure happen when a new model is used?

Thanks,

Allan

#1
10/11/2005 (3:35 am)
Uhm.... are you talking about using custom models? or just multiple korks?
#2
10/11/2005 (4:45 am)
Im using the block guy, but using two diffrent colours of him. One colour (the 1st one) goes into the game, does what hes told and animates fine from the AI rules. The 2nd type goes into the game, does what hes told but wont animate. I can add as many as I want of one model, but as soon as I change to a diffrent one it wont animate :(
#3
10/11/2005 (4:57 am)
I'm not 100% sure about the block guy since i've never used him. but i'm going to assume you're just using the same model, with a different texture. For each player character you need it's own .cs file that lists all the animation sequences. are you sure you've done this?
#4
10/11/2005 (5:04 am)
To get the diffrent models (a red guy and a blue guy) ive just taken the original model, renamed the folder (blue_player and red_player) so there are two diffrent copies of the model. I then changed the texture in the copy to be red which gives a red model with the same shape and animations etc. Because of this they have their own .cs files, but they are identicle, simply copies of each other that refer to the diffrent model files which are in diffrent folders. Would the .cs files being the same cause this problem? (ive not looked into animation much in Torque)

Thanks for the help
#5
10/11/2005 (7:12 am)
Hmmm
datablock TSShapeConstructor(PlayerDts)
{
   baseShape = "./player.dts";
   sequence0 = "./player_root.dsq root";
   sequence1 = "./player_forward.dsq run";
   sequence2 = "./player_back.dsq back";
...........

only thing i can think of is the CS file looks for the base shape... do you have the baseshape pointing to the copied object?
#6
10/11/2005 (7:24 am)
Both the models (red and blue) work with animations when they are the first one being used. When I select red_model to spawn first then the red guy is animated, but then I select blue_model to be spawned first then its animated...
#7
10/11/2005 (7:53 am)
I'm fairly new to Torque so I may be off base, but if you just copied the cs files from one directory to another they are in effect overriding each other because you have named the datablocks the same. In the above code sample if both .cs file (red and blue) call their datablock PlayerDts it may be causing conflicts.
#8
10/11/2005 (8:06 am)
Ive renamed the datablocks in the two .cs files, also changed the model, and .cs file names themselfs to something diffrent, and still no joy. I thought this may be the case as the player uses the same model again (same one recoloured in diffrent folder) and the animations for it also seem to work. It must be with how im calling the 2nd AI model.