Jump to content
Sign in to follow this  
Kydoimos

Door Animation Issue

Recommended Posts

Hi all!

 

Really bizarre one this, and I really can't fathom where I'm going wrong! Basically, I've modelled a gun rack and I have a row of clamps that hold the guns. I've got the 'door' animation working on these clamps, but for some weird reason, only every odd clamp opens and shuts. I've checked my model config etc. and all the animation classes are identical. So, door 1 opens, door 2 doesn't, door 3 opens, and door 4 doesn't and so on...

 

So, then I thought, 'perhaps it's a collision thing and the clamps are too close together?'. I made a model with just clamp 2 (door 2) and still, that particular one wouldn't open! Very confused! :P If anyone has any thoughts or suggestions, please give me a shout!

 

Thanks as always, guys!

 

 

Share this post


Link to post
Share on other sites

@Bad Benson - good idea! :) Here we go, matey:

class CfgSkeletons
{
	class Default
	{
		isDiscrete = 1;
		skeletonInherit = "";
		skeletonBones[] = {};
	};	
	class Gun_Rack_Bones : Default
	{
		skeletonInherit = "Default";
		skeletonBones[] = {"Door_1", "Door_2", "Door_3", "Door_4", "Door_5", "Door_6", "Door_7", "Door_8", ""};
	};
};

class Rotation;
class CfgModels
{
	class Default 
	{
		sectionsInherit = "";
		sections[] = {};
		skeletonName = "";
	};
	
	class Gun_Cabinet : Default
	{
		sections[] = {"camo"};
		skeletonName = "Gun_Cabinet_Bones";
		
		class Animations
		{	
		class Gun_Rack : Default
	        {
		sections[] = {"camo"};
		skeletonName = "Gun_Rack_Bones";
		
		class Animations
		{
			class Gun_Rack_Rotation_01
			{
				type = "rotation";
				source = "user";
				selection = "Door_1";
				memory = 1;
				axis = "Axis_01";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_02
			{
				type = "rotation";
				source = "user";
				selection = "Door_2";
				memory = 1;
				axis = "Axis_02";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_03
			{
				type = "rotation";
				source = "user";
				selection = "Door_3";
				memory = 1;
				axis = "Axis_03";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_04
			{
				type = "rotation";
				source = "user";
				selection = "Door_4";
				memory = 1;
				axis = "Axis_04";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_05
			{
				type = "rotation";
				source = "user";
				selection = "Door_5";
				memory = 1;
				axis = "Axis_05";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_06
			{
				type = "rotation";
				source = "user";
				selection = "Door_6";
				memory = 1;
				axis = "Axis_06";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_07
			{
				type = "rotation";
				source = "user";
				selection = "Door_7";
				memory = 1;
				axis = "Axis_07";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
			
			class Gun_Rack_Rotation_08
			{
				type = "rotation";
				source = "user";
				selection = "Door_8";
				memory = 1;
				axis = "Axis_08";
				minValue = 0;
				maxValue = 1;
				animPeriod = 0;
				angle0 = 0;
				angle1= "rad -90";
			};
		};
	};
};

And here's the config entry:

class Gun_Rack : Items_base_F
	{
		scope = 2;
		icon = "iconObject_2x3";
		model = "\Gun_Cabinet\Gun_Cabinet\Gun_Rack.p3d";
		displayName = "STR____to_do______x";
		vehicleClass = "small_items";
		hiddenSelections[] = {};
		hiddenSelectionsMaterials[] = {};
		hiddenSelectionsTextures[] = {};

		class AnimationSources
		{
		class Gun_Rack_Rotation_01
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_02
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_03
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_04
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_05
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_06
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_07
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		class Gun_Rack_Rotation_08
			{
				source = "user";
				initPhase = 0;
				animPeriod = 1.45;
			}
		};
	};

Share this post


Link to post
Share on other sites

first thing i noticed is your bone definitions. i'm pretty rusty with all this but i'm pretty sure the wa you have it set up the bones are parented to eachother in a row like a spine.

 

you have

 

 

skeletonBones[] = {"Door_1", "Door_2", "Door_3", "Door_4", "Door_5", "Door_6", "Door_7", "Door_8", ""};

 

try this instead

 

 

skeletonBones[] =

{

    "Door_1", ""

    "Door_2", ""

    "Door_3", ""

    "Door_4", ""

    "Door_5", ""

    "Door_6", ""

    "Door_7", ""

    "Door_8", ""

};

 

or something like it. again. been a while.

  • Like 1

Share this post


Link to post
Share on other sites

@Bad Benson - okay, man! Thanks! I'll give it a go! :)

Share this post


Link to post
Share on other sites

@Bad Benson - Yay!

 

Oh mate, you've SO made my day - got it sorted with your help! I owe you one! I've spent literally 2 days trying to resolve this! Thank you!

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  

×