Dsq animations
by Tasty Green Pees :-, · in Torque Game Engine · 02/19/2006 (6:28 pm) · 6 replies
I'm new to Torque. Does anyone know where the dsq animations are called from. For example when you press jump, where does sequence8 get called.
This is the player.cs file from data/shapes/player folder
Thank you.
This is the player.cs file from data/shapes/player folder
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
sequence0 = "./player_root.dsq root";
sequence1 = "./player_forward.dsq run";
sequence2 = "./player_back.dsq back";
sequence3 = "./player_side.dsq side";
sequence4 = "./player_lookde.dsq look";
sequence5 = "./player_head.dsq head";
sequence6 = "./player_fall.dsq fall";
sequence7 = "./player_land.dsq land";
sequence8 = "./player_jump.dsq jump";
...Thank you.
About the author
#2
02/20/2006 (10:26 am)
By "the source" do you mean hard coded?
#3
02/20/2006 (10:36 am)
I mean c++ .... You may want to look at the Player::onTrigger function as well (in script)
#4
How would I go about getting my player to perform a custom action like wave or something at the press of the button?
02/20/2006 (11:24 am)
Right I got it.How would I go about getting my player to perform a custom action like wave or something at the press of the button?
#5
But I'm assuming you meant somehting that's not already in there. Take a look at default.bind.cs, and figure out how the wave animation works :)
02/20/2006 (11:25 am)
Well, ctrl+W will make your player wave.But I'm assuming you meant somehting that's not already in there. Take a look at default.bind.cs, and figure out how the wave animation works :)
#6
However I've scowered around starter.fps and indeed it was possible to get an idea about what is goinf on.
Funfortunately, in trying to apply this I keep getting the error:
As far as i can see everything is in order.
In the default.bind.cs file I have this...
In player.cs I've added the following...
and in data/shapes/player/player.cs there is:
Can you tell me what I'm messing up or what I've overlooked, Chris.
Thanks
02/21/2006 (3:05 pm)
I was working off tutorial.base so there was not wave animation functionHowever I've scowered around starter.fps and indeed it was possible to get an idea about what is goinf on.
Funfortunately, in trying to apply this I keep getting the error:
Mapping string: playWaveAnimation to index: 3 serverCmdplayWaveAnimation: Unknown command.
As far as i can see everything is in order.
In the default.bind.cs file I have this...
moveMap.bindCmd(keyboard, "ctrl w", "commandToServer('playWaveAnimation',\"wave\");", "");In player.cs I've added the following...
function Player::playWaveAnimation(%this, %anim)
{
%this.setActionThread("celwave");
}and in data/shapes/player/player.cs there is:
... sequence27 = "./player_celwave.dsq celwave"; ...
Can you tell me what I'm messing up or what I've overlooked, Chris.
Thanks
Torque Owner Chris Labombard
Premium Preferred