Game Development Community

Amination problems

by Paulo Egidio · in Torque Game Engine · 08/17/2005 (11:41 am) · 2 replies

Hi ppl...

I'm hitting a brick wall here which, for sure, someone on the community with more flight hours under their belt can solve easily ; )

I have a datablock that is my player and its anumations , like this

datablock Player01(PlayerDTS)
{
baseshape = "./x.dts";
sequence0 = "./x01.dsq root";
sequence1 = "./xwalk01.dsq walk";
};


OK?

Well , my question is this :

- How can I change the walk, root labels and make the engine understand this? I've searched the .cs everywhere(and some o the .cc too), but I sill can't find this...
- How can I make a run animation(or any animation for that matter...) stop playing when the player releases the walk key?

Thanks!

#1
08/17/2005 (12:51 pm)
Look in ts/tsShapeConstruct.cc (this is where the .cs file gets read), and tsShapeOldRead.cc (this is where the sequences get loaded).

Is there a reason why you have "Player01"?

( instead of looking like this: )
datablock TSShapeConstructor(PlayerDts)
{
   baseShape = "./player.dts";
   sequence0 = "./player_root.dsq root";
   ...
}

You can change the labels on ordinary animations to whatever you want, but you probably shouldn't change the first few (run, back, side etc.) as these are hard coded in the engine. You will have to look for them and fix that. I know they are hard coded in player.cc, but they may be elsewhere as well.

Hope that helps.
#2
08/17/2005 (12:59 pm)
@Chris
thanks! To tell you the truth, the player01 thing was a typo. I must have been thinking about that object while I was typing..sorry.
But,... you shone some light with the last paragraph....that was what I was looking for.
BTW, hard coding stuff like that sucks big time... gonna try to change this in my engine since I want to be able to change these things.. and expand to create new ones too...Right now it's not hurting my development, but in the future I'll sure changes this. When I do it, i'll post it as a resource to the community.

Thanks!