Jump to content
Sign in to follow this  
DerBiwi

Problem with muzzleflashrotation animation

Recommended Posts

Heydee hoo Folks,

I currently working on an weapon mod, and at some of my weapons I got an problem with the animations of the muzzleflashes and the firemodeselector.

the Strange thing is, that the animation works at some of the newer modells, I created directly with OB. This is in my opiniion the reason of the error, because in all the Modells I made before in O2,

the two animations doesnt work.

Here some pictures to show you my problem:

The wrong muzzleflashrotation:

http://www7.pic-upload.de/08.04.14/8368lmwq74wq.jpg (355 kB)

The firemodeselector:

Singlemode:

http://www7.pic-upload.de/08.04.14/cgp1o3s3jgq9.jpg (372 kB)

Auto:

http://www7.pic-upload.de/08.04.14/ukdxs9if8pgb.jpg (337 kB)

I really dunno where the error is. the most of my Model.cfg is from the samplemodels and two weapons, which are nearly the same designed (other version of the rifle) are working.

Last but not least is here the model.cfg

class CfgSkeletons
{
class Default
{
	isDiscrete=0;
	skeletonInherit="";
	skeletonBones[]={};
};
class biw_weapon_skeleton_base: Default
{
	skeletonBones[]=
	{
		"magazine",
		"",
		"bolzen",
		"",
		"trigger",
		"",
		"trigger_02",
		"",
		"feuermodi",
		"",
                                               "zasleh",
                                                 "",
                                               "zasleh_02",
                                               "",
                                              "auswurf",
		"",
                                                "rohr",
                                               "",
                                               "ironsights",
		"",
                                              "optik_hinten",
                                                  "",
                                              "optik_vorne",
                                              "",
                                              "siderail",
                                              ""
	};
};

};
class CfgModels
{
class Default
{
	sectionsInherit="";
	sections[]={};
	skeletonName="";
};



class biw_weapon_base: Default
{
	sections[]=
	{
		"zasleh","zasleh_02","magazine","bolzen","trigger","trigger_02","feuermodi","siderail","rohr","optik_vorne","optik_hinten","auswurf","ironsights"
	};

                               htMin = 1;		// Minimum half-cooling time (in seconds)
	htMax = 600;	// Maximum half-cooling time (in seconds)
	afMax = 0;		// Maximum temperature in case the model is alive (in celsius)
	mfMax = 0;		// Maximum temperature when the model is moving (in celsius)
	mFact = 1;		// Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
	tBody = 100;	 // Metabolism temperature of the model (in celsius)

	skeletonName="biw_weapon_skeleton_base";


	class Animations
	{
////Magazin
		class magazine_hide
		{

			type="hide";
			source="reloadMagazine";
			selection="magazine";
			minValue=-0.40000001;
			maxValue=0.40000001;
			minPhase=-0.40000001;
			maxPhase=0.40000001;
			hideValue=0.75;
			sourceAddress="mirror";
		};

		class no_magazine
		{

			type = "hide";
			source = "hasMagazine";
			selection = "magazine";
			hideValue = 0.1;

		};


////kimme & Korn
class BackSight_optic
		{
			type="rotationZ";
			source="hasOptics";

			selection="optik_vorne";
			axis="BackSight_axis";
			memory=1;
			minValue=0.0000000;
			maxValue=0.1;
			angle0=0.000000;
			angle1=rad 90;
		};
		class ForeSight_optic
		{
			type="rotationZ";
			source="hasOptics";

			selection="optik_hinten";
			axis="ForeSight_axis";
			memory=1;
			minValue=0.0000000;
			maxValue=0.1;
			angle0=0.000000;
			angle1=rad -90;
		};


////kimme & Korn hide
class ironsights_hide_optic
		{
			 type="hide";
			 source="hasOptics";
			 selection="ironsights2";
			 animPeriod=0;
			 minValue=0.0;
			 maxValue=0.3;
			 minPhase=0.0;
			 maxPhase=0.3;
			hideValue=0.1;
			sourceAddress="mirror";
		};


////Abzug
                                               class trigger_translation
		{
		                type="translation";
			source="reload";
			selection="trigger";
			axis="trigger_axis";
			memory = 1;
			minValue=0;
			maxValue=1;
			offset0=0;
			offset1=1;
		};

                                                        class trigger_rotation
                                                             {
                                                            type = "rotation";
			source = "reload";
			sourceAddress = "clamp";
			selection = "Trigger02";
			axis = "trigger_axis02";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = rad -30;
                                       };

////Bolzen
                                            class bolzen_empty
		{
			type="translation";
			source="isEmpty";
			selection="bolzen";
			axis="bolt_axis";
			memory=1;
			minValue=0.000000;
			maxValue=1.00000;
			offset0=0;
			offset1=1.0000;
		};

class bolzen_fire_begin
		{
			type="translation";
			source="reload";
			selection="bolzen";
			axis="bolt_axis";
			memory=1;
			minValue=0.000000;
			maxValue=1.00000;
			offset0=0;
			offset1=1.00000;
		};

		class bolzen_fire_end:bolzen_fire_begin
		{
			minValue=1.00000;
			maxValue=0.000000;
			offset0=0;
			offset1=-1.0000;
		};

		class bolzen_reload_begin
		{
			type="translation";
			source="reloadmagazin";
			selection="bolzen";
			axis="bolt_axis";
			memory=1;
			minValue=1.0000;
			maxValue=0.0000;
			offset0=0;
			offset1=1.0000;
		};

		class bolzen_reload_end:bolzen_reload_begin
		{
			minValue=0.980000;
			maxValue=1.000000;
			offset0=0;
			offset1=-1.00000;
		};

                                             class auswurf_fire
		{
			type="translation";
			source="reload";
			selection="auswurf";
			axis="auswurf_axis";
			memory = 1;
			minValue=0;
			maxValue=1;
			offset0=0;
			offset1=0.5;
		};


////Rohr

class rohr_fire_begin
		{
			type="translation";
			source="reload";
			selection="rohr";
			axis="rohr_axis";
			memory=1;
			minValue=0.000000;
			maxValue=1.00000;
			offset0=0;
			offset1=1.00000;
		};


////Schiene
                                                class siderail_hide
		{
			 type="hide";
			 source="hasAccessory";
			 selection="siderail";
			 animPeriod=0;
			 minValue=0.0;
			 maxValue=0.3;
			 minPhase=0.0;
			 maxPhase=0.3;
			hideValue=0.1;

		};





		class muzzleFlashROT
		{
			type="rotationX";
			source="ammoRandom";      //use ammo count as phase for animation
			sourceAddress="loop";     //loop when phase out of bounds
                                                            centerFirstVertex=true;
			selection="zasleh";  //selection we want to rotate
			minValue=0;
			maxValue=4;               //rotation angle will be 360/4 = 90 degrees
			angle0="rad 0";
			angle1="rad 360";
		};

////Feuermodi
class safety_mode_rot
		{
			type			= "rotation";
			source			= "weaponMode";
			selection		                = "feuermodi";
			axis			= "safety_axis";
			memory			= 1;
			minValue		= 0;
			maxValue		= 1;
			angle0			= 0;
			angle1			=rad -25;
		};
	};
};

class biw_g40: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};


class biw_g40c: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};


class biw_g40gl: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};


class biw_g40s: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};


class biw_mg40: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};


class biw_mg40c: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};



class biw_lr555: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};


class biw_lr554: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};

class biw_mfs: biw_weapon_base
{
		class Aniations: Animations
	{
	};	
};
};

I hope, you can help me, fix this problem...

Share this post


Link to post
Share on other sites

Might be that you're missing the autocenter = 0 property in your GeometryLOD

With your Geometry LOD selected toggle the Named Properties window with [Ctrl+1], right-click the window, click 'New' and fill out the EditProperty window that appears with autocenter (American English spelling) in the 'Name' field and 0 in the 'Value' field.

Share this post


Link to post
Share on other sites

I love you :o

It works.

For two weeks I searched the reason for this problem, and it was so simple...

Thanks man...

Share this post


Link to post
Share on other sites

ok, I'll need your help again:

Now, I have added some new Ironsights, with rotating parts, when I have an optic on it.

The problem is, that the animation doesn't work.

Here the pictures:

http://www7.pic-upload.de/09.04.14/be1jzs1et47.jpg (397 kB)

http://www7.pic-upload.de/09.04.14/ovlwehtb1jz1.jpg (397 kB)

And the missing part of the Ironsight:

http://www7.pic-upload.de/09.04.14/srl6urjlzihj.jpg (321 kB)

So, After the last solution, I believe, there are others Properties missing in my Modell.

Can someone tell me, which Properties are missing?

Greets,

Biwi

EDIT:Problem "fixed": Worng named Axis...:eek:

Edited by DerBiwi
No problem, just my own unintelligence

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  

×