Jump to content
Sign in to follow this  
granQ

Switch animations when dead

Recommended Posts

Got problem with a animation on a vehicle, the static living one works perfectly but when i kill the gunner he doesnt play the "dying" animation.

Code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMovesMC

{

class Default {};

class DefaultDie: Default {};

class States

{

class Driver: Default {};

class SCWCPvPjGunnerDying: DefaultDie

{

actions = NoActions;

file=\SCWC_Pvpjas1110\SCWCPvPjGunnerdie.rtm;

speed=-time;

looped=false;

soundEnabled=false;

connectFrom[]={SCWCPvPjGunner,1};

};

class SCWCPvPjGunnerDead: SCWCPvPjGunnerDying

{

actions = DeadActions;

file=\SCWC_Pvpjas1110\SCWCPvPjGunnerdead.rtm;

speed=SPEED_STATIC;

terminal = true;

connectFrom[]={Name##Dying,1};

connectTo[]={DeadState,1};

};

class SCWCPvPjGunner: Driver

{

file=\SCWC_Pvpjas1110\SCWCPvPjGunnerstat.rtm;

speed=SPEED_STATIC;

looped=true;

variantsAI[]= {SCWCPvPjGunnerV1,0.7,SCWCPvPjGunner};

interpolateWith[]={NSCWCPvPjGunnerV1,0.5};

equivalentTo=Name;

interpolationSpeed=1;

connectTo[]={SCWCPvPjGunnerDying,1};

};

class SCWCPvPjGunnerV1: SCWCPvPjGunner

{

file=\SCWC_Pvpjas1110\SCWCPvPjGunner.rtm;

speed=-vartime;

looped=true;

};

};

};

class CfgVehicleActions

{

SCWC_PvPjas1110Gunner = "SCWCPvPjGunner";

};

And of course i use "ManActSCWC_PvPjas1110Gunner" in the vehicles part (thats why the living one works)

Share this post


Link to post
Share on other sites

What happens if you try this

(changed the order of some of the classes)

(removed the connectFrom[]={SCWCPvPjGunner,1}; from the Dying class)

(changed the connectFrom[]={Name##Dying,1}; into connectFrom[]={SCWCPvPjGunnerDying,1}; just in case)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgVehicleActions

{

SCWC_PvPjas1110Gunner = "SCWCPvPjGunner";

};

class CfgMovesMC

{

class Default {};

class DefaultDie: Default {};

class States

{

class Driver: Default {};

class SCWCPvPjGunner: Driver

{

file=\SCWC_Pvpjas1110\SCWCPvPjGunnerstat.rtm;

speed=SPEED_STATIC;

looped=true;

variantsAI[]= {SCWCPvPjGunnerV1,0.7,SCWCPvPjGunner};

interpolateWith[]={NSCWCPvPjGunnerV1,0.5};

equivalentTo="SCWCPvPjGunner";

interpolationSpeed=1;

connectTo[]={SCWCPvPjGunnerDying,1};

};

class SCWCPvPjGunnerV1: SCWCPvPjGunner

{

file=\SCWC_Pvpjas1110\SCWCPvPjGunner.rtm;

speed=-vartime;

looped=true;

};

class SCWCPvPjGunnerDying: DefaultDie

{

actions = NoActions;

file=\SCWC_Pvpjas1110\SCWCPvPjGunnerdie.rtm;

speed=-time;

looped=false;

soundEnabled=false;

};

class SCWCPvPjGunnerDead: SCWCPvPjGunnerDying

{

actions = DeadActions;

file=\SCWC_Pvpjas1110\SCWCPvPjGunnerdead.rtm;

speed=SPEED_STATIC;

terminal = true;

connectFrom[]={SCWCPvPjGunnerDying,1};

connectTo[]={DeadState,1};

};

};

};

Share this post


Link to post
Share on other sites

I had the same problems with an infantry guy.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class FOUBinocLying: CombatBase

{

actions = BinocLyingActions;

file=plazenidalekstat.rtm; // TODO: ai variants

speed=-2;

looped=true;

disableWeapons=false;

showItemInHand = true;

soundEnabled=false;

enableBinocular = true;

onLandBeg=true;

onLandEnd=true;

duty = RestDuty;

connectFrom[] = {LyingToBinocLying,1};

interpolateTo[]={LyingDying,0.1};

};

Adding the interpolateTo line solved that problem.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×