Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
beppe_goodoldrebel

Delayed weapon animation ( model cfg )

Recommended Posts

Hi all!

I have trouble finding a way to animate the bolt carrier of my AR15s during magazine reloading. 

In real world the bolt return to initial position when the bolt catch is pressed. 

I've found a way to reproduce this animation but it starts when the event "reloadMagazine" comes in ... so too early before the bolt catch is pressed.

 

Is there a way to delay the animation waiting for the bolt catch to be pressed?

this is the code as now

class bolt_reload_begin
			{
				type="translation";
				source="reloadMagazine";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.1;
				maxValue=0.15;
				offset0=0;
				offset1=0.5;
			};

Share this post


Link to post
Share on other sites

 

Hi all!

I have trouble finding a way to animate the bolt carrier of my AR15s during magazine reloading. 

In real world the bolt return to initial position when the bolt catch is pressed. 

I've found a way to reproduce this animation but it starts when the event "reloadMagazine" comes in ... so too early before the bolt catch is pressed.

 

Is there a way to delay the animation waiting for the bolt catch to be pressed?

this is the code as now

class bolt_reload_begin
			{
				type="translation";
				source="reloadMagazine";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.1;
				maxValue=0.15;
				offset0=0;
				offset1=0.5;
			};

 

Basically the animation you've defined locks the bolt back and its only 'released' when the 'reloadmagazine' source is complete, what you need is another animation that kicks in and releases the bolt later on in the 'reloadmagazine' source.

Something like:

class bolt_reload_end
			{
				type="translation";
				source="reloadMagazine";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.9; // THE TIME RELATIVE TO THE ANIMATION OF THE ENTIRE RELOAD PROCESS (0-1) this is when the bolt will begin to snap forward
				maxValue=0.95; // THIS IS THE SAME 0.05 TIME-LAPSE OF THE BOLT LOCKING BACK, ONLY ITS GOING FORWARDS.
				offset0=0;
				offset1=-0.5; // NOTE THE - (MINUS) VALUE IS REVERSING THE INITIAL ANIMATION.
			};

The values (min and max values) will most likely need changing to fit your animation timings, but theoretically that should work.

  • Like 2

Share this post


Link to post
Share on other sites

Ok solved! Here is what i've done

class bolt_dry
			{
				type="translation";
				source="IsEmptyNoReload";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.000000;
				maxValue=0.300000;
				offset0=0;
				offset1=0.5;
			};

			class bolt_reload_begin
			{
				type="translation";
				source="reloadMagazine";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.00000001;
				maxValue=0.00000005;
				offset0=0;
				offset1=0.5;
			};

			class bolt_reload_end
			{
				type="translation";
				source="reloadMagazine";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.9; 
				maxValue=0.95; 
				offset0=0;
				offset1=-0.5; 
			};

I've used source IsEmptyNoReload so bolt will stop when weapon is dry.

When reload begin the bolt will move in the same position as bolt_dry.
In the end the bolt will move to initial position with the bolt cath pressed.

 

Many thanks!

 

The only problem is you cant simulate a quick reload with ammo already loaded. 
The bolt will move to "open" every time you reload... I dont see any source about reload with full magazine.

 

Maybe using this:

ammo (A3) Number of remaining ammo in magazine (that means revolving * count)

when ammo is zero stop the bolt and release. Otherwise it will not move... 
I have to study this solution...

Share this post


Link to post
Share on other sites

×