User Tools

Site Tools


arma:modeling:machine_gun_belt_animation

ArmA 1 Machine Gun Belt Animation

ArmA 1 Forum, ArmA 1 Home, ArmA 1 Config, ArmA 1 Tools, ArmA 1 File Formats, ArmA 1 Missions, ArmA 1 3D Modeling, ArmA 1 Terrain, ArmA 1 Texturing, ArmA 1 Scripting

ArmA 1 aka Armed Assault (ArmA)

Machine Gun Belt Animation by Skaven

The other day I was playing with tpM'91 with an M60 we got from CS and we managed to do the belt animation like the original M240,M249 and PK. I don't know if this as been explained before, but it's better two tutorials than none, so here it goes.

1 - Open your model in O2 and make a selection called “belt_rotation”,redefine the entire belt of bullets you want move on your MG and save it.

2 - Inside your cpp file open this class:

class CfgSkeletons
{
	class nameofyourweapon
	{
		isDiscrete = 0;
		skeletonInherit = "";
		skeletonBones[] =
		{
			"magazine","",
			"belt_rotation","",
			"trigger",""
		};
	};
};

*Note- I also opened a magazine and trigger selection but it ain't important here since SLX already explained how to do it.

3 - Again in the cpp file, inside your CfgModels describe the new selection and animation as you see below.

class CfgModels
{
	class Default
	{
		sections[] = {};
		sectionsInherit = "";
	};
	class Weapon: default{};
 
	class nameofyourweapon
	{
		skeletonName = "nameofyourweapon";
 
		class Animations
		{
			class reload_magazine
			{
				type = "hide";
				source = "reloadMagazine";
				selection = "magazine";
				hidevalue = 0.10;
			};
 
			class trigger
			{
				type = "rotationZ";
				source = "reload";
				selection = "trigger";
				axis = "trigger_axis";
				minValue = 0;
				maxValue = "3";
				angle0 = "0";
				angle1 = "-3";
			};
 
			class belt_rotation
			{
				type = "rotationx";
				source = "reload";
				selection = "belt_rotation";
				axis = "belt_rotation_axis";
				minValue = 0;
				maxValue = "5";
				angle0 = "0";
				angle1 = "1";
			};
		};
 
		sections[] = { "zasleh" };
		sectionsInherit = "";
	};
};

*Note- Again the magazine and trigger classes are just eye candy and they ain't relevant for this tutorial, I didn't delete them because some of you may find it useful if you already have some animations on your current MG.

To play around with the sliding belt you just need to take two values in consideration.

The first is the type = “”, “rotationx” will move you belt from the left to the right or right to the left, the second is the definition of the starting side the angle1 = “”.

“0” is a static value which means it won't move at all, negative values like “-1”, “-2”… will make the belt move from the right to the left, positive values like the “1”, “2”… will make it move from the left to the right as I did on the M60 you will see in the movie (example) below.

One thing to take into consideration is the “rotationz” not presented here. Let's say you have the belt not attached to a box but instead falling from the ground like Rambo (insert a laugh here please). If that is the case you want the belt to move from below to above, for that you will use the “rotationz” and again you play with the angle called angle1=“” to set direction of the belt's movement.

Now something worth noticing, let's say that you want the belt to move not straight but unbalanced, for that you will play with the angle0 = “”. I think most of us won't be using this angle but now you know what it does.

Below you can see an example movie of the correct animation for the M60's belt.

http://www.youtube.com/watch?v=vJTOsF17ilY

Again, sorry for my English and thank you.

arma/modeling/machine_gun_belt_animation.txt · Last modified: 2024/08/01 09:38 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.