Game Development Community

NPC's

by Chris Sargent · in Torque 3D Professional · 11/26/2009 (10:33 pm) · 5 replies

I tried searching for a list of steps to take to an a NPC to my demo and didn't come up with anything that was useful for me.

I have 4 models I purchased sometime back, I can add them to the game by the usual way of adding shapes, but I want to use them in the game and this is where I'm not sure how to do things.

This is what I need to learn and if someone could point me in the right direction it would be greatly appreciated!

I saw the aiplayer script but am not sure how to modify it for my character.

I'm guess I need to create a datablock for my NPC player as well.

I also saw that when I add the model to the game and bring it up in the shape editor the model has animations associated with it, but there are no dsq files, so I'm not sure how to even set up a script to use these.

As you can see I'm very new at this and have been working through the torque scripting section in the documentation as I figured I would be using more of that at first.

Anyways thanks in advance and I hope you all had a happy Thanksgiving!

#1
11/29/2009 (7:47 am)
Well I figured out most of my question. I went to the very last page of this forum and started looking at every post until I found what I needed around the era of beta 3, no idea why it did not show up in my search.

Still have one outstanding question. All the scripts I've looked at play animations by referencing a dsq file. These dts's do not have any dsq files, yet there are animations associated with them. How do I play these animations in game?

Thanks,
#2
11/29/2009 (9:23 am)
Make your TSshapeConstructor file reference the animations without a directory.

singleton TSShapeConstructor(GideonReduxDts)
{
   baseShape = "./gideon.dts";
   sequence0 = "./player_root.dsq root";
   sequence1 = "./player_forward.dsq run";
....
};
#3
11/29/2009 (4:54 pm)
Thanks Steve,

I'll give that a try!
#4
11/29/2009 (7:30 pm)
Oh one question in the example you provided:

sequence0 = "./player_root.dsq root";

is that not referencing a dsq file? If so, I don't have any dsq files for these dts objects. Or maybe i'm just not understanding what you told me.

Thanks,
#5
11/29/2009 (7:36 pm)
That's referencing the DSQ inside the DTS.

Quote:
bring it up in the shape editor the model has animations associated with it, but there are no dsq files