Game Development Community

Which handles animation: Script or Engine?

by Eric Prem · in Torque Game Engine · 03/12/2006 (2:23 pm) · 4 replies

I have had the SDK for a while, but I just noticed one thing. Now that I am modifying the tuorial.base (in version 1.4) I was wondering how the game activates the animations? In what script is the code that activates an animation sequence?

This is a really dumb question propably because I have been looking for the wrong thing the whole time, but can anyone help me out? I mean I have been looking for a line that says something like: when player presses 'w' run sequence "forward' or something like that.

Eric Prem

#1
03/12/2006 (2:52 pm)
The engine does that but script can run animations. look in player.cc for the word "run" and you'll probably find what you're looking for.
#2
03/12/2006 (2:56 pm)
And the engine already rons the sequence run when you press "W". I think they change this in the thread making a player fly. so if you wanted to change that I would look there.
#3
03/12/2006 (3:09 pm)
IIRC, animations are called "threads" in TorqueScript.

playThread( "thread name") will do it for most things. I think weapons (called "images" for some historical reason) control their animation through settings in their data blocks. The crossbow weapon that comes with the FPS sample should have an example...

And there it is... example\starter.fps\server\scripts\crossbow.cs. The second to the last dataBlock is the description of the crossbow's various states. Some of those states define a "stateSequence". My bet would be that's the weapon animation for that state. Ready, reload, fire, empty... sounds right to me.

I can't find any references to running animations in the scripts I just poked through, so I'd guess that's handled by the engine too. Could be wrong.

--Mark
#4
03/12/2006 (6:53 pm)
Thanks guys, all of you...

Mark, were you trying to be sarcastic there? It was just a simple question...
Anyways, the Crossbow doesn't use DSQ's though does it? I don't have 3dsmax so I can't open the Max file. Actually I don't see a ms3d file for the crossbow itself. Is there something going on with the PaperPort files? I mean has my computer misread them?

EDIT: Just realized that ms3d files are NOT max files. Does anyone know how to open them or those PaperPort files?

Thanks,
Eric Prem