How to play the sequence animation using the keyboard?
by Simon Siu-pun SHUM · in Torque Game Engine · 05/24/2006 (9:02 pm) · 1 replies
Hello,
i export all the animation to the .DSQ file and also i succeed to import all the sequence animation to the showtool.But, when i started to use the sequence in the game engine using the keyboard i.e. press one key and then play the sequence animation. It was failure.
there were some script showing my situation:
In the data/shapes/player/player.cs :
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
.
.
.
sequence8 ="./player_attack1.dsq attackFirst";
sequence9 ="./player_attack2.dsq attackSecond";
sequence10 ="./player_attack3.dsq attackThird";
sequence11 ="./player_attack4.dsq attackFourth";
.
.
.
};
Then, in the cilent/default.bind.cs :
.
.
.
function attackFirst :: %val()
{
playThread( 0,attackFirst );
}
.
.
.
moveMap.bind( keyboard, k, attackFirst );
.
.
.
Running in the gameEngine in console:
warn message: client/default.bind.cs (118): Unable to find function playThread
Thank all,
simon
i export all the animation to the .DSQ file and also i succeed to import all the sequence animation to the showtool.But, when i started to use the sequence in the game engine using the keyboard i.e. press one key and then play the sequence animation. It was failure.
there were some script showing my situation:
In the data/shapes/player/player.cs :
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
.
.
.
sequence8 ="./player_attack1.dsq attackFirst";
sequence9 ="./player_attack2.dsq attackSecond";
sequence10 ="./player_attack3.dsq attackThird";
sequence11 ="./player_attack4.dsq attackFourth";
.
.
.
};
Then, in the cilent/default.bind.cs :
.
.
.
function attackFirst :: %val()
{
playThread( 0,attackFirst );
}
.
.
.
moveMap.bind( keyboard, k, attackFirst );
.
.
.
Running in the gameEngine in console:
warn message: client/default.bind.cs (118): Unable to find function playThread
Thank all,
simon
Torque 3D Owner Brandon Maness