Author Topic: making mounted object player the walking/crouch etc animations  (Read 960 times)

[not possible topic dead]

Does anyone know how to make an object mounted to a bot play the animations for walking when moving forward etc?

Code
Code: [Select]
package gravPack
...
 {
function Player::setActionThread(%this,%name, %hold, %fsp)
{
echo(%name);
%mount = %this.getMountedObject(0);
if(%this.dataBlock $= PlayerD && isObject(%this.getMountedObject(0)))
{
%mount.setActionThread(%this,%name, %hold, %fsp);
echo("poo");
}
else
parent::setActionThread(%this,%name, %hold, %fsp);

}
 }; activatePackage(gravPack);
...

I have also tried playthread(....)

Edit:
I mean when the bot walks forwards the player mounted to the bot plays the animation rather than the bot.
I do unconventional things with bots, we can just leave it at that.
« Last Edit: June 20, 2012, 02:00:38 PM by zmaster »


Uhm, what?
He wants to have a mounted player play the animations that the Bot should play.

Like, if the bot is playing armFire, he wants to redirect it to the object that's mounted to it.

I actually don't know if this is possible, but I'd try parenting playThread

Code: [Select]
package your_package
{
function Player::playThread( %this, %x, %y )
{
parent::playThread( %this, %x, %y );
%db = %this.getDataBlock();

for ( %i = 0 ; %i < %db.numMountPoints ; %i++ )
{
%obj = %this.getMountedObject( %i );

if ( isObject( %obj ) )
{
// This won't recurse and go a step back because you cannot do circular mounting.
%obj.playThread( %x, %y );
}
}
}
};

activatePackage( "your_package" );

playThread does not seem to be called when the running/backpedal/crouch/fall animations are played, whan method is called for those?

playThread seems to only be called when you use tools
« Last Edit: May 28, 2012, 11:02:44 AM by zmaster »

playThread does not seem to be called when the running/backpedal/crouch/fall animations are played, whan method is called for those?

playThread seems to only be called when you use tools

setActionThread

setActionThread seems be no good as well.
Seems the only time that is called is when the root animation is played..
I am beginning to wonder if this can even be done via script

setActionThread seems be no good as well.
Seems the only time that is called is when the root animation is played..
I am beginning to wonder if this can even be done via script

Oh right. The issue is that setActionThread is just an interface to engine mechanics. The engine doesn't call it by itself. There's not really anything you can do.


bump

...

Oh right. The issue is that setActionThread is just an interface to engine mechanics. The engine doesn't call it by itself. There's not really anything you can do.