Player animations are called where? TGEA
by Kevin Turchik · in General Discussion · 03/04/2009 (8:04 am) · 6 replies
I have found the keyboard binds in default.bind.cs
moveMap.bind( keyboard, a, moveleft );
moveMap.bind( keyboard, d, moveright );
etc...
But how our character animations called to play when these buttons are pressed? Note: Im more of an artist than a coder.
Thanks,
Kevin
moveMap.bind( keyboard, a, moveleft );
moveMap.bind( keyboard, d, moveright );
etc...
But how our character animations called to play when these buttons are pressed? Note: Im more of an artist than a coder.
Thanks,
Kevin
#2
03/05/2009 (9:02 pm)
Where is player.cc located?
#3
t3d it seems to be little harder to find the files Stronghold has it with the character folder so its little easier to find things. :P
03/05/2009 (9:25 pm)
i think it might have changed allot as i don't quite know where player.cc is maybe thats what tge uses don't know though. there is a player.cs that has the animations set up. in Stronghold the file its placed at Stronghold\game\scriptsAndAssets\data\shapes\player. now in T3D folder its placed in \game\scriptsAndAssets\server\scripts\players.t3d it seems to be little harder to find the files Stronghold has it with the character folder so its little easier to find things. :P
#4
If you take a look into data/shapes/player/ or below folders in every game example, you'll find such files player.cs, elf.cs, SpaceOrc.cs defining every needed animations. For example, if you open up the SpaceOrc.cs, you will find the lines as below.
baseShape = "./SpaceOrc.dts";
sequence0 = "~/data/shapes/players/animations/player_root.dsq root";
sequence1 = "~/data/shapes/players/animations/player_forward.dsq run";
sequence2 = "~/data/shapes/players/animations/player_back.dsq back";
sequence3 = "~/data/shapes/players/animations/player_side.dsq side";
As you may suppose now, these are defining animations root, run, back, side which will be played according to your key input. So to speak, 'root' will be played when you input nothing, 'run' when 'W' pressed, 'back' when 's' pressed, and 'side' when 'a' or 'd' pressed.
In addition to that, you can play neccessary animation by calling such as setActionThread() functions in the game.
03/05/2009 (10:21 pm)
@Kevin,If you take a look into data/shapes/player/ or below folders in every game example, you'll find such files player.cs, elf.cs, SpaceOrc.cs defining every needed animations. For example, if you open up the SpaceOrc.cs, you will find the lines as below.
baseShape = "./SpaceOrc.dts";
sequence0 = "~/data/shapes/players/animations/player_root.dsq root";
sequence1 = "~/data/shapes/players/animations/player_forward.dsq run";
sequence2 = "~/data/shapes/players/animations/player_back.dsq back";
sequence3 = "~/data/shapes/players/animations/player_side.dsq side";
As you may suppose now, these are defining animations root, run, back, side which will be played according to your key input. So to speak, 'root' will be played when you input nothing, 'run' when 'W' pressed, 'back' when 's' pressed, and 'side' when 'a' or 'd' pressed.
In addition to that, you can play neccessary animation by calling such as setActionThread() functions in the game.
#5
03/06/2009 (7:12 am)
Quote:Where is player.cc locatedFor TGE: engine/game. For TGEa: engine/source/T3D, and the file is called player.cpp. pickActionAnimation() does most of the work for movement animations with a few other functions handling any other special cases. It/they work by using the sequences defined in the datablock TSShapeConstructor() -- the sequence animation files described by game4Rest.
#6
03/06/2009 (8:20 am)
ok thnx guys i think this answers most of my questions.
Torque Owner Daniel Buckmaster
T3D Steering Committee