Game Development Community

Rex to the Rescue!!

by Rex · in Torque 3D Beginner · 08/19/2011 (8:00 am) · 1 replies

Here's how to get the stock 'Soldier' DAE figure to have working footprints, haven't delved into the 'puffs'/particles or the 'footstepSound'/audio.

Inside the asset folder for Soldier, there is a script, "soldier_rigged.cs". Inside this script is the TSShapeConstructor object datablock with several lines of script which separate out the single 'ambient' DAE sequence into the index listing a 'normal' DTS shape is loaded with. Line 19 contains the arguments for constructing the 'Run'/forward sequence.

%this.addSequence("ambient", "run", "1510", "1530");
%this.addSequence("ambient", "back", "1610", "1630");

...the above is how the script looks before the edit.

%this.addSequence("ambient", "run", "1510", "1530");
%this.addTrigger("run", "10", "2");
%this.addTrigger("run", "19", "1");
%this.addSequence("ambient", "back", "1610", "1630");

...and here is where I've added in the 2 lines which embed triggers in the sequence.

Remember that each sequence inside the scripting is assumed to start at Frame#0 and end with the last Frame#. "Run" contains 20 Frames of animation, so it would start at Frame0 and end on Frame19. Do NOT use the internal frame count in the master 'ambient' sequence as reference.

You can now go thru and apply this to each of the 'movement' sequences you want to see Decals applied to the terrain: 'back', 'side', 'crouch_forward'...etc.

Happy Torque Developing!

Rex

About the author

Rex does all his 3D graphics through BrokeAssGames and is currently working on DSQTweaker, Ecstasy Motion, and other interesting projects yet to be revealed. Just ask him about anything DTS/DSQ related, he's happy to help.