Jump to content
Sign in to follow this  
bias12

Simple gun animating parts problem

Recommended Posts

I have been having a problem animating a simple model of a glock I threw together to learn the workflow of modding in the arma series.

The model is made, textured (crudely), I have model.cfg and config.cpp made up, but I can't figure out how to animate the parts of the gun e.g trigger

I have a named selection in o2 that I want to move when the gun is fired, so have set up my skeleton and model cfg's bone and section, with the named part I have named in LODS in O2, but no animation comes forth.

A few questions,

1) Is the actual movement in the animation defined in the model.cfg or in the keyframes in o2

2) Are the bones and sections from the model.cfg simply the named selection in o2, or am I missing something?

I have been to the wiki pages on model configs and animating models, but I cant see where I am going wrong.

I'll include my model.cfg, I can't see anything blatantly wrong with it, but this is my first attempt so who knows.

class cfgSkeletons
{

class Default
{
	sectionsInherit="";
	sections[] = {};
	skeletonName = "";
};

class SCO_Glock21_Skeleton : Default
{
	isDiscrete=0;
	skeletonInherit="";
	skeletonBones[]=
	{
		"slide",
		""
	};
};
};
class cfgModels
{
class SCO_Glock21
{
	sectionsInherit="";
	sections[]=
	{
		"slide"
	};
	skeletonName="SCO_Glock21_Skeleton";
	class Animations
	{
		class slide
		{
			type="translation";
			source="revolving";
			selection="slide";
			axis="";
			memory="";
			sourceAddress="loop";
			minvalue=0;
			maxvalue=1;

		};

	};
};
};

Any help would be appreciated. Thanks.

Share this post


Link to post
Share on other sites

The animations are defined in the model.cfg. The 'bones' are animated parts on the model. Check out the ArmA sample models for some examples on how these things are laid out.

I believe sections are only needed for cases where the texture might change, like in a damage texture or hidden selection.

Share this post


Link to post
Share on other sites

Thanks Max, that's what I ended up doing. It was a little tough due to the lack of animated weapons in the arma sample files but have managed to puzzle it out.

I might throw a small tutorial together to demonstrate the concept because there isn't anything fantastic on this exact problem.

Share this post


Link to post
Share on other sites

There's a lot of information on the forums, and tuts that mention it, but I am not aware of one for weapons exclusively.

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  

×