Jump to content
eggbeast

correct animation of pistol slide with reloadmagazine

Recommended Posts

 

can anyone help enlighten me about how to animate the weapon's slide when we reload magazine from a half empty or fully empty magazine.
notice in the vid when half-empty, the slide correctly cocks the weapon after reloading magazine.
BUT when fully-empty the slide is fixed to rear position at start of mag reload anim, and so goes out of range during the sequence.

This is caused by asymettrical movement in the isEmpty source - which is correct for the slide position at empty, but then throws out the reloadmagazine sequence.

It seems i need 2 reloadmagazine sequences - one whe nthe weapon is empty and one when it is half-empty.

 

any ideas on best way to solve this?

could source = "isEmptyNoReload"; do anything useful?

 

model.cfg

class CfgSkeletons
{
	class Pistol
	{
		isDiscrete=1;
		skeletonInherit="";
		skeletonBones[]={};
	};
	class uns_tt33_new_skel: Pistol
	{
		skeletonBones[]=
		{
			"magazine", "",
			"bullet", "magazine",
			"mag_switch", "",
			"slide","",
			"trigger","",
			"hammer","",
			"zasleh",""			
		};
	};

};
class CfgModels
{
	class Pistol
	{
		sectionsInherit="";
		sections[]={};
		skeletonName="";
	};
	class uns_tt33_new_base: Pistol
	{
		sections[]=
		{
			"bullet","magazine",
			"mag_switch",
			"slide","hammer",
			"zasleh","trigger"
		};
		skeletonName="uns_tt33_new_skel";
		class Animations
		{
            class muzzleflash_hide
			{
				type="hide";
				source="hasSuppressor";
                selection="zasleh";
                minValue = 0.0;
                maxvalue = 0.25;
                hideValue = 0.01;
            };
			class MuzzleFlashROT
 			{
 				type="rotationX";
 				source="ammoRandom";
 				sourceAddress="loop";
 				selection="zasleh";
 				axis="barrel_axis";
 				centerFirstVertex=true;
 				minValue=0;
 				maxValue=4;
 				angle0="rad 0";
 				angle1="rad 360";
 			};
//mag
			class unloaded_magazine_hide
			{
				type = "hide";
				source = "hasMagazine";
				selection = "magazine";
				hideValue = 0.1;
			};
			class magazine_hide: unloaded_magazine_hide
            {
                source="reloadMagazine";
                minValue=0;
                maxValue=1;
                hideValue=0.3;
                unhideValue=0.51;
            };
			class magazine_bullets_hide: magazine_hide
            {
                selection="bullet";
                hideValue=0.01;
            };
//reload mag
            class magazine_move1
            {
                type = "translation";
                source="reloadMagazine";
                selection="Magazine";
                axis = "Magazine_axis";
                minValue = 0.12;
                maxValue = 0.25;
                offset0 = "0";
                offset1 = "2";
            };
            class magazine_move2: magazine_move1
            {
                minValue = 0.51;
                maxValue = 0.6;
                offset1 = "-2";
            };
            class mag_switch_move1
            {
                type = "translation";
                source="reloadMagazine";
                selection="mag_switch";
                axis = "mag_switch_axis";
                minValue = 0.1;
                maxValue = 0.11;
                offset0 = "0";
                offset1 = "-1";
            };
            class mag_switch_move2: mag_switch_move1
            {
                minValue = 0.15;
                maxValue = 0.17;
                offset1 = "1";
            };
			class slide_cocked
			{
                type="translation";
                source="reloadmagazine";
                selection="slide";
				axis="slide_axis";
				minValue=0.7;
				maxValue=0.85;
				offset0=0;
				offset1=1;
			};
			class slide_cocked2: slide_cocked
			{
				minValue=0.86;
				maxValue=1;
				offset1=-1;
			};
/*
//not necessary as hammer is cocked in base state
			class hammer_cocked: slide_cocked
			{
				type = "rotationZ";
				selection="hammer";
				axis="hammer_axis";
				angle0=0;
				angle1=rad 70;
			};
*/			
//firing
			class trigger1
			{
				type = "rotationZ";
				source = "reload";
				selection = "trigger";
				axis = "trigger_axis";
				minValue = 0;
				maxValue = 0.5;
				angle0 = "rad 0";
				angle1 = "rad -20";
			};
			class trigger2: trigger1
			{
				minValue = 0.51;
				maxValue = 1;
				angle1 = "rad 20";
			};
			class hammer_fire1: trigger1
			{
				selection="hammer";
				axis="hammer_axis";
				angle1=rad -70;
				minValue = 0.26;
				maxValue = 0.5;
			};
			class hammer_fire2: trigger2
			{
				selection="hammer";
				axis="hammer_axis";
				maxValue = 0.75;
				angle1=1.221730;
			};
			class slide_fire_begin
			{
                type="translation";
                source="reload";
                selection="slide";
				axis="slide_axis";
				minValue=0.26;
				maxValue=0.51;
				offset0=0;
				offset1=-1;
			};
			class slide_fire_end: slide_fire_begin
			{
				minValue=0;
				maxValue=0.25;
				offset1=1;
			};
//empty
			class slide_empty: slide_fire_begin
			{
				source="isEmpty";
				minValue=0.99;
				maxValue=1;
				offset1=1;
			};
/*
//not necessary as hammer is cocked in base state
			class hammer_empty: hammer_fire2
			{
				source="isEmpty";
				minValue=0.99;
				maxValue=1;
			};
*/
            class rounds_empty
            {
				type="hide";
                source="isEmpty";
                selection="bullet";
                minValue=0;
                maxValue=1;
                hideValue=0.1;
            };
			class empty_magazine_bullets_hide: rounds_empty
            {
				source = "isEmptyNoReload";
                hideValue=0.01;
            };	
		};
	};
	class uns_tt33: uns_tt33_new_base{};
};

 

Share this post


Link to post
Share on other sites

i am wondering if i should use revolving to manage the slide instead of isempty, but either way, if i do a tactical reloadmagazine, the slide will be forward when i start the sequence, and if do reloadmagazine when the weapon is empty, then the slide will be back.

 

ok i looked at the BI models. they don't cock the slide if a partial reload is done.

Share this post


Link to post
Share on other sites

Most semi-auto pistols you don't need to rack the slide when changing the magazine. It's only done to load/make ready the weapon for the first time from the original magazine, or if you release the slide after emptying the magazine, before inserting a new magazine.

 

From an emptied magazine you just release the slide from being locked back and it will pick up the round from the new magazine. The game does this automatically when isEmpty source returns to 0.

 

From a half empty mag you'd nominally have a round in the chamber, which would cycle the first round from the new magazine after firing the one in the chamber. I know Arma doesn't do +1 reloads but in general, reload anims are treated as such where reloading is by releasing the bolt/slide alone

 

IIRC though isEmptyNoReload does return the weapon to the isEmpty = 0 state when a reloadMagazine animation starts.

  • Like 1

Share this post


Link to post
Share on other sites

ok thanks. so in general i should use the isempty source to manage the slide, and not the reloadmagazine source.

 

I guess with this TT-33 I have been watching a lot of cocking actions due to the weapon misfiring repeatedly, and that had got me confused in terms of the reload actions..

 

it's a shame that charging weapons is not somehow possible in the current animation sequences.

For example we have a lovely model M16 with complete charging handle modeled, but we never get to use it.

 

IRL a weapon is gonna mis-feed from time to time, resulting in the need to clear the chamber and re-charge the weapon.

  • Like 1

Share this post


Link to post
Share on other sites

As I added to the end of the post: I think isEmptyNoReload returns the bone to its original position when the reloadMagazine sequence starts, however. So it would act like the slide was released before inserting the new mag

 

I think with BIS' weapons they all use isEmptyNoReload but start the reloadMagazine animation with the slide/bolt moved back as it would be from the isEmpty/isEmptyNoReload source

 

Depends what style of reload you want. But you can't really have the reload anim conditional of whether the magazine is full or empty

Share this post


Link to post
Share on other sites

ok thanks i'll have a play with it.

i was wondering what that source was for, as i couldn't find any documentation for it.

 

i ideally wanted the hammer to move back to coincide with the slide being pulled back during the end of the reloadmagazine anim sequence, on a partial reload.

 

on reflection i think what i have been seeing, and not fully realising it, is the real world shooter is releasing the bolt, then reloading their pistol, then sliding the action to cock it again each time they reload the mag.  looks like some people have an issue with TT-33's in that they automatically slide forward without any provocation, during handling. i suppose if that were the case you might well want to know exactly where the action was, and what it was going to do next, so releasing the bolt makes sense before reloading it.

 

Share this post


Link to post
Share on other sites

A3 doesn't have the ability to change animations depending on the status of the weapon's chamber. I mean, sure you could whip something up with isEmpty and hiding so that you have two slides. One that is visible during the reloadmagazine phase when its empty and one that is visible when it isn't empty but the in game animations used by the player do not change. So its better to make one animation with the character and making the reloadmagazine fit that.

Share this post


Link to post
Share on other sites
On 2/5/2017 at 0:02 AM, eggbeast said:

ok thanks. so in general i should use the isempty source to manage the slide, and not the reloadmagazine source.

 

I guess with this TT-33 I have been watching a lot of cocking actions due to the weapon misfiring repeatedly, and that had got me confused in terms of the reload actions..

 

it's a shame that charging weapons is not somehow possible in the current animation sequences.

For example we have a lovely model M16 with complete charging handle modeled, but we never get to use it.

 

IRL a weapon is gonna mis-feed from time to time, resulting in the need to clear the chamber and re-charge the weapon.

The first IA/Malfunction drill on most assault rifles, and sidearms is to simply re cock the weapon, and continue firing. This is the first IA I teach all my Iraqi Local Nationals for the AK, simply re cock, and continue engaging, thereafter any further stoppages you start looking for the causes, such as empty magazine, loose magazine, and obstruction in the chamber, all those are simple stoppages and are generic to most personal weapons platforms out there. The issue with the AK is that there's no holding open device,for the empty magzine drill. so for speed, it's better to let the working parts go forwards, change mags, re cock, and continue engaging. 

I don't think the game engine would be able to accurately  distinguish between any sort of malfunction/stoppages, it would look pretty cool. 

Share this post


Link to post
Share on other sites

yeah as far as i can tell the AK has almost the same mechanism / animation for cocking on first unfired mag as it does on reloading a mag after firing one off. or is that wrong?

but the m16, and a lot of our weapons in unsung, have separate charging handles, that never get used, or a cocking lever which needs moving further back to fully cock it on first mag load..we could do with a "reloadmagazinefired" source to distinguish between an empty weapon having its first loading sequence, and a previously fired (i.e. still cocked) magazine reloadmagazine sequence.

 

a connected issue is how far back the charging handle is pulled and where the bolt is at the time

on some weapons the bolt is closed forward during firing, so reloading a mag tactically (i.e. half empty) the bolt starts in a forward position (say X forward of start point O, or O+X), so when it moves back to cock it may move Y, so the bolt is now moved to O+X-Y.

 

but the bolt remains open if the mag is empty, and you are loading a fresh mag, so the bolt is now at O. when you load a mag and cock the weapon the bolt now moves back to O-Y. In some cases this means you see the back of the bolt appearing through the back of the breech, and hitting you in the eye!

 

we have many similar weapons in the mod, where we have to be careful about thebolt movements during reloading a full or empty magazine, as the bolt (and charging handle) behaves differently to standard BI weaponry.

  • Like 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

×