Game Development Community

How to play the sequence animation using mouse ?

by Simon Siu-pun SHUM · in Torque Game Engine · 06/09/2006 (1:54 pm) · 0 replies

Hello all ,
As i know how to play sequence using keyboard.Nevertheless, Is it same as play sequence animation using keyboard? Do i correct the doing this in the above situation?
Do you mind telling me how to correct this problem.

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 );
}

this should be something like:

function attackfirst(%pressed)
{
if(%pressed)
player_name.playThread( 0, "attackFirst" ); //where player_name is the name youve set for it
}

moveMap.bind( mouse, button, attackFirst );

Therefore, could you mind telling me if i want to play more than one sequence animation in the same button i.e. when i click the button once, it will play the attackfirst. Moreover, when i click the button twice (or double click), it will play the attacksecond and so on.

Thanks all fo help,

simon