Jump to content
Sign in to follow this  
Messiah

A question about animations

Recommended Posts

ok... i've got myself some animations for a cargo position done by our animator... i've manged by copying and pasting to get a static cargo anim working ingame - great

now... he's also supplied me with an animated one, a animated death, and then the static death.... problem is, i havnt a clue how to intergrate them into my config...

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

class CfgVehicleActions

{

UKF_WMIKGunner = "UKF_WMIKGunner";

};

class CfgMovesMC

{

class Default {};

class DefaultDie: Default {};

class StandBASE: Default {};

class States

{

class Driver: Default {};

#define VEH_DIE(Name,anim,time) \

class Name##Dying: DefaultDie \

{ \

actions = NoActions; \

file=anim##smrt.rtm; \

speed=-time; \

looped=false; \

soundEnabled=false; \

}; \

class Name##Dead: Name##Dying \

{ \

actions = DeadActions; \

file=anim##smrt2.rtm; \

speed=SPEED_STATIC; \

terminal = true; \

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

connectTo[]={DeadState,1}; \

}

#define VEH_DIE_CONN(Name,anim,time) \

class Name##Dying: DefaultDie \

{ \

actions = NoActions; \

file=anim##smrt.rtm; \

speed=-time; \

looped=false; \

soundEnabled=false; \

connectFrom[]={Name,1}; \

}; \

class Name##Dead: Name##Dying \

{ \

actions = DeadActions; \

file=anim##smrt2.rtm; \

speed=SPEED_STATIC; \

terminal = true; \

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

connectTo[]={DeadState,1}; \

}

#define VEHIN_MOVES(Name,anim) \

class Name: Driver \

{ \

file=anim##stat.rtm; \

speed=SPEED_STATIC; \

looped=true; \

}

#define VEHIN_MOVES_VAR(Name,anim,vartime) \

class Name: Driver \

{ \

file=anim##stat.rtm; \

speed=SPEED_STATIC; \

looped=true; \

variantsAI[]= {Name##V1,0.7,Name};\

interpolateWith[]={Name##V1,0.5};\

equivalentTo=Name; \

interpolationSpeed=1; \

connectTo[]={Name##Dying,1}; \

} \

class Name##V1: Name \

{ \

file=anim.rtm; \

speed=-vartime; \

looped=true; \

}

#define VEHIN_MOVES_VAR_NODEAD(Name,anim,vartime) \

class Name: Driver \

{ \

file=anim##stat.rtm; \

speed=SPEED_STATIC; \

looped=true; \

variantsAI[]= {Name##V1,0.7,Name};\

interpolateWith[]={Name##V1,0.5};\

equivalentTo=Name; \

interpolationSpeed=1; \

} \

class Name##V1: Name \

{ \

file=anim.rtm; \

speed=-vartime; \

looped=true; \

}

#define VEH_MOVES(Name,anim,time) \

VEHIN_MOVES(Name,anim); \

VEH_DIE_CONN(Name,anim,time)

#define VEH_MOVES_VAR(Name,anim,time,vartime) \

VEHIN_MOVES_VAR(Name,anim,vartime); \

VEH_DIE_CONN(Name,anim,time)

#define VEHICLE_DIE(name) VEH_DIE(name,name,1)

#define VEHICLE_MOVES(name) VEH_MOVES(name,name,1)

#define VEHICLEIN_MOVES(name) VEHIN_MOVES(name,name)

#define VEHICLE_MOVES_VAR(name) VEH_MOVES_VAR(name,name,1,4)

#define VEHICLEIN_MOVES_VAR(name) VEHIN_MOVES_VAR_NODEAD(name,name,4)

VEH_MOVES_VAR(UKF_WMIKGunner, \UKF_WMIK\Wmik_codriver_Static, 0.5, 12);

};

};

thats the bit in question smile_o.gif

the other anims have similiar names:

Wmik_codriver.rtm - Animated co driver

Wmik_codriver_death1.rtm - animated death

Wmik_codriver_deathstatic.rtm - static death

i've been messing around trying to get these working, but to no avail... the code i've got in my config is one that a friend wrote for me quickly just to get a static gunner anim workin on another addon which didnt require animated bollocks... lol

cheers tounge_o.giftounge_o.giftounge_o.gif

Share this post


Link to post
Share on other sites

For a vehicle, a gunner (for driver replace gunner)

In config vehicle:

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

gunnerAction="ManActUKF_WMIKGunner";

Note manAct before the name

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

{

class ProxyCrew {};

class ProxyGunner: ProxyCrew {};

class ProxyUKF_WMIKGunner: ProxyGunner {};

};

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

class CfgVehicleActions

{

UKF_WMIKGunner="UKF_WMIKGunner";

};

<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 Gunner: Default {};

class UKF_WMIKGunner: Gunner

{

file="\YourAddon\anims\UKF_WMIKGunner.rtm";

speed=-10.000000;

looped=1;

connectTo[]={"UKF_WMIKGunnerDying",1};

interpolateTo[]={"UKF_WMIKGunnerDying",0.100000};

};

class UKF_WMIKGunnerDying: DefaultDie

{

actions="NoActions";

file="\ YourAddon \anims\ UKF_WMIKGunner_dead.rtm";

speed=-0.5;

looped=0;

soundEnabled=0;

connectFrom[]={"UKF_WMIKGunner",1};

};

class UKF_WMIKGunnerDead: UKF_WMIKGunnerDying

{

actions="DeadActions";

file="\YourAddon\anims\ UKF_WMIKGunner_dead_stat.rtm";

speed=10000000000.000000;

terminal=1;

connectFrom[]={"UKF_WMIKGunnerDying",1};

connectTo[]={"DeadState",1};

};

};

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  

×