Jump to content
Sign in to follow this  
bmgarcangel

Animation problem

Recommended Posts

hey

So i have this animation for a static .30 caliber machine gun that a friend just finished for me but I do have one odd and really weird problem involving something i've never seen happen before.  Now, what happens is when you start the mission for about a second the guy in the static gun, bassically only AI's ahve this problem, so the ai will start out good for about 2 or 3 seconds and then he will fold back up and go straight like, you know like that weird attention thing that you get when you make a soldier in o2 lite.  

Anyhow, anyone know of this type of problem.  I'd love to fix it soon if i can....

~Bmg

Share this post


Link to post
Share on other sites

Could you post a screenshot and the config? Or you'll settle for a few wild guesses?

"fold back up and go straight" is just a little bit too vague for me.

Share this post


Link to post
Share on other sites

Ya, the config needs to be posted since i'm pretty sure it's the cause for this sorta problem (not the anim).

Share this post


Link to post
Share on other sites

IIRC, this is a problem caused when the unit is playing a static anim but when the "time" has finished he has nothing to link to and so it goes to the default stick-animation. (at least that's what I think happens)

To fix this, you could try changing the speed to "SPEED_STATIC"

Ex.

speed = SPEED_STATIC;

If this fails to work, you should copy the animation and rename it to the same name but add STAT onto the end.

Ex.

gunner.rtm

Copied + pasted then renamed to:

gunnerSTAT.rtm

Then in the config.cpp make a new animation move and link the first one to the second one using connectTo. Give the second animation speed "SPEED_STATIC" as above.

If you don't understand this, sorry - i'm not sure I understand it myself tounge_o.gif

Just pray DeadMeat finds this thread wink_o.gif

Good luck!

Share this post


Link to post
Share on other sites

LOL

well, i'm a little confused. I really really hate this part of the "unexplored" part of configing that i do not yet understand ( much like recoil, its so confusing! )

Anyhow, this is the part of the config that configs the animation i'm chatting about:

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

{

file="\TFW_Anim\m19a4box_gunner.rtm";

speed=10000000000.000000;

looped=1;

variantsAI[]={"m19a4BOXgunnerV1",0.700000,"m19a4BOXgunner"};

interpolateWith[]={"m19a4BOXgunnerV1",0.500000};

equivalentTo="m19a4BOXgunner";

interpolationSpeed=1;

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

};

class m19a4boxgunnerV1: m19a4boxgunner

{

file="\TFW_Anim\m19a4boxgunner.rtm";

speed=-4;

looped=1;

};

class m19a4boxgunnerDying: DefaultDie

{

actions="NoActions";

file="plazenismrt.rtm";

speed=-1;

looped=0;

soundEnabled=0;

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

};

class m19a4boxgunnerDead: m19a4boxgunnerDying

{

actions="DeadActions";

file="plazenismrt2.rtm";

speed=10000000000.000000;

terminal=1;

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

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

};

};

};

Share this post


Link to post
Share on other sites

What that looks like to me is that the driver plays his animation for a very very long time then he'd automatically play the death animation, dead or not... crazy_o.gifrock.gif

For the gunner, it seems like he just plays his animation for 4 seconds, it loops and after a while it has nothing to do...IIRC looped doesn't make him loop it indefinetly for some reason.

To be honest it looks like the whole cpp is reallly rock.gif - try having a look at the BAS configs or others.

Here's a snippet from the UKF Landy project:

class CfgVehicleActions

{

UKF_DriverAll = "UKF_DriverAll";

UKF_Gunner = "UKF_Gunner";

};

class CfgMovesMC

{

class Default {};

class DefaultDie: Default {};

class StandBase: Default {};

class States

{

class Driver: Default {};

#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_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 VEH_MOVES_VAR(Name,anim,time,vartime) \

VEHIN_MOVES_VAR(Name,anim,vartime); \

VEH_DIE_CONN(Name,anim,time)

VEH_MOVES_VAR(UKF_DriverAll, \UKFLR_90GS\Animations\UKF_DriverAll, 1, 5);

VEH_MOVES_VAR(UKF_Gunner, \UKFLR_90GS\Animations\UKF_Gunner, 1, 0.1);

All that needs changing is the very last part and the very first part smile_o.gif Plus you need to have the animation, a static version (with the FIRST 3 frames of the animation), a death animation and a static death animation (with the LAST 3 frames of the animation). Name them:

anim.rtm - normal animation

animsmrt.rtm - death animation

animsmrt2.rtm - static death animation

animSTAT.rtm - static normal animation

Hope this helps or even makes sense crazy_o.gif

Share this post


Link to post
Share on other sites

Assuming you only have a single, static, 3 frames long animation file, i think there's a mistake in the path pointing to it:

In "m19a4boxgunner" you have "m19a4box_gunner.rtm" for file.

In "m19a4boxgunnerV1" it's "m19a4boxgunner.rtm". Notice the missing underscore between "box" and "gunner".

Also, if you'll only be using a single file, my guess is you can get rid of "m19a4boxgunnerV1", and remove all references to it from "m19a4boxgunner". Not tested but i think it should work.

That "speed=10000000000.000000;" makes no sense if your animation is static.

But it still isn't clear to me how many anim files you have, whether they are static or not, and what exactly happens after 3-4 seconds.

My advice is the same as Gameer's. Use something that's already been done and it's working, for a template, if you're not comfortable with the animation config. You can look at the official Chinook for instance.

Or, if you want us to talk you through the entire thing, help you out, etc.. i really think you should explain more clearly what the situation is. Make our job (and your life) easier by posting everything you can: configs, screenshots, links to the anim files, etc..

Share this post


Link to post
Share on other sites

Well you know if you look at soldiers in o2 lite. Thats what happens, the soldier will go to that static shape lol......but anyhow, i'm going to test it now. I put the speed to static for the first part.

~Bmg

Share this post


Link to post
Share on other sites

Hey

I changed the speed to static speed but still didn't help. Anyhow, here is a picture of the problem for you guys to understand it more! The picture is the ai soldier and what he does then in the background you can see me in what the anim should look like.....

prob.JPG

Share this post


Link to post
Share on other sites

I suggest you just take the config from another addon and modify that to use for your own purposes, then it's gaurunteed to work. smile_o.gif

Share this post


Link to post
Share on other sites

Do you have a single animation file? And if so, are all the paths pointing to it accurate? Because this situation only occurs when the game cannot find the anim file. And as i said, your paths don't match:

file="\TFW_Anim\m19a4box_gunner.rtm";

file="\TFW_Anim\m19a4boxgunner.rtm";

This is my best guess.

Share this post


Link to post
Share on other sites

hey

I just changed the config around a little......

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

{

file="\TFW_Anim\m19a4box_gunner.rtm";

speed=SPEED_STATIC;

looped=1;

variantsAI[]={"m19a4BOXgunnerV1",0.700000,"m19a4BOX_gunner"};

interpolateWith[]={"m19a4BOXgunnerV1",0.500000};

equivalentTo="m19a4BOXgunner";

interpolationSpeed=1;

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

};

class m19a4boxgunnerV1: m19a4box_gunner

{

file="\TFW_Anim\m19a4box_gunner.rtm";

speed=-4;

looped=1;

};

class m19a4boxgunnerDying: DefaultDie

{

actions="NoActions";

file="plazenismrt.rtm";

speed=-1;

looped=0;

soundEnabled=0;

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

};

class m19a4boxgunnerDead: m19a4boxgunnerDying

{

actions="DeadActions";

file="plazenismrt2.rtm";

speed=10000000000.000000;

terminal=1;

connectFrom[]={"m19a4boxgunnerDying",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  

×