Jump to content

Sign in to follow this  
zachgibson22

aminating the bolt issue, can you help?

Recommended Posts

Hey so I've decide I should learn how to animate at least some of the parts of the gun so I can help people when they ask me!

Right now I'm have an issue with the bolt animating.

It does go back when it is empty and It looks nice and I have all the O2 points set up correctly. But when I reload is slowly moves back another couple of inches then resets itself when the animation is finished.

Also the bolt will not move back when firing to let the shell out. Any idea on how to get this working. I was having a looks a Kiroys SA80 and I didn't see any sort of code for it to work but yet it still works?!

If anyone could let me know that would be awesome and I might even update my Guide! Thanks Guys!

http://forums.bistudio.com/showthread.php?154474-Zachs-Full-on-guide-to-Custom-Weapons!/page1

Share this post


Link to post
Share on other sites

It'd help if you pasted a copy of your model.cfg

However, the fact that your bolt is moving backwards a little extra when you change the magazine, but not moving when you fire the weapon, suggests to me that you've used the 'reloadmagazine' source for your bolt animation instead of the 'reload' source.

Share this post


Link to post
Share on other sites

ha! I have a similar issue but I am under the impression that the bolt moves when I am in 1st person but fails to move when in 3rd. Also the reload magazine action plays only in 1st person; not in 3rd. Heres my model.cfg:

Btw, I do things mainly by looking at how others have done them before, and it may sound silly but I have no idea whether the 'skeletonName="AG_MP9";' actually has to have a corresponding name (i.e. "AG_MP9") in O2. If yes, where do I assign it?

class CfgSkeletons
{
class Default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = {};
};
class AG_MP9 : Default
{
	SkeletonBones[]=
	{
		"trigger","",			
		"magazine","",
		"bolt","",
		"zasleh", "",
	};
};
};
class CfgModels
{
class Default
{
	sections[] = {};
	sectionsInherit="";
	skeletonName = "";
};
class mp9 : Default
{
	skeletonName="AG_MP9";
	sections[]=
	{
		"zasleh",
	};
	class Animations
	{			
		class bolt_action
		{
			type="translationX";
			offset0=0;
			offset1=0;
			axis="";	//unknown :(
			memory=0;
			minValue=0;
			maxValue=0.08;
			minPhase=0;
			maxPhase=0.08;
			source="reload";
			sourceAddress=0;
			selection="bolt";
		};
		class bolt_empty
		{
			type="translationX";
			offset0=0;
			offset1=0;
			axis="";	//unknown :(
			memory=0;
			minValue=0;
			maxValue=0.06;
			minPhase=0;
			maxPhase=0.06;
			source="isEmpty";
			sourceAddress=0;
			selection="bolt";
		};
		class trigger
		{
			type="translationX";
			offset0=0;
			offset1=0;
			axis="";	//unknown :(
			memory=0;
			minValue=0;
			maxValue=0.016;
			minPhase=0;
			maxPhase=0.016;
			source="reload";
			sourceAddress=0;
			selection="trigger";
		};
		class magazine_hide
		{
			type="hide";
			hideValue=0.1;
			minValue=0.2;
			maxValue=0.25;
			minPhase=0.2;
			maxPhase=0.25;
			source="reloadMagazine";
			sourceAddress=0;
			selection="magazine";
		};
		class MuzzleFlashROT
		{
			type="rotationX";
				source="ammoRandom";
			sourceAddress="loop";
			memory=1;
			animPeriod=0;
			selection="zasleh";    
			axis="flash_axis";
			minValue=0;
			maxValue=4;   
			minPhase=0;
			maxPhase=4;
			angle0="rad 0";
			angle1="rad 360";
		};
	};
};

class mp9_folded: mp9 {};
class mp9_wcam: mp9 {};
};

Share this post


Link to post
Share on other sites

Omg, I'm dumb for not posting the coding XD

here's my model cfg

class CfgSkeletons

{

class Default

{

isDiscrete=1;

skeletonInherit="";

skeletonBones[]={};

};

class tb_arifle_m16a4_base: Default

{

skeletonBones[]=

{

"magazine",

"",

"bolt",

""

};

};

};

class CfgModels

{

class Default

{

sectionsInherit="";

sections[]={};

skeletonName="";

};

class tb_arifle_m16a4_base: Default

{

sections[]=

{

"magazine",

"bolt"

};

skeletonName="tb_arifle_m16a4_base";

class Animations

{

};

};

class sa_58v: tb_arifle_m16a4_base

{

class Animations

{

class magazine_reload_move_1

{

type="translation";

source="reloadMagazine";

selection="magazine";

axis="magazine_axis";

minValue=0.145;

maxValue=.2;

offset0=0;

offset1=0.4;

};

class magazine_hide

{

type="hide";

source="reloadMagazine";

selection="magazine";

minValue= 0;

maxValue=.5;

minPhase= 0;

maxPhase=.5;

hideValue=1;

sourceAddress="mirror";

};

class bolt_empty

{

type="translation";

source="isempty";

selection="bolt";

memory=1;

sourceAddress="clamp";

minValue=0;

maxValue=1;

begin="bolt_start";

end="bolt_end";

offset0=0;

offset1=1;

};

class bolt_empty_1

{

type="translation";

source="reloadMagazine";

selection="bolt";

memory=1;

sourceAddress="clamp";

minValue=0;

maxValue=1;

begin="bolt_start";

end="bolt_end";

offset0=0;

offset1=1;

};

};

};

};

[Code]

Can't remember how to make the code scrollable..lol sorry

Share this post


Link to post
Share on other sites

Yea, like I thought:

Your class bolt_empty_1 animation is using source="reloadMagazine"; when you should be using source="reload";

Share this post


Link to post
Share on other sites

Yeah that worked! Thanks man! You don't happen to know how to make the hands line up better when taking out that mag do you? I read a little about masking the hands but I have no idea what that's referring to.

Share this post


Link to post
Share on other sites

It requires making a new 'gesture' type .rtm animation. The "mask" refers to the fact that gestures can be bone-masked, whereby the animation will only apply to the selections/bones listed in the chosen mask rather than all of the bones/selections in the skeleton.

This mask is what allows the upper body to perform the reload animation while the legs are performing the walk animation - merging the two together as a seamless walk-while-reloading anim. There are other examples of bone-masked animations in Arma 2 and 3 such as the hand signals and handanims for holding the weapons (this is why you only need to move the hand bones when making custom handanim .rtm files).

There has been some discussion on how to make and config custom reload gestures:

http://forums.bistudio.com/showthread.php?152807-Custom-reload-gestures

Haven't tried making one myself yet though.

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  

×