Jump to content
Sign in to follow this  
nitro65

memory points not working vehicle arma2

Recommended Posts

having trouble with animation memory points not working in game , can only get animations to work with scripts addaction?

Edited by NITRO65

Share this post


Link to post
Share on other sites

You can have an animation base on model.cfg, config.cpp only and the model itself. I will give you an example from working model which are cargo doors of heavy transport helicopter.

Model.cfg SkeletonBones section

class int73_mi6a_Skeleton: Helicopter
{
	isDiscrete=1;
	skeletonInherit="Helicopter";
	skeletonBones[]=
	{
		"ramp_leftdoor","",
		"ramp_rightdoor",""		//note lack of comma at end of skeletonBones section
	};
};

Model.cfg Sections

class int73_mi6a: Helicopter
{
	skeletonName="int73_mi6a_Skeleton";
	sectionsInherit="";
	sections[]=
	{
		"ramp_leftdoor",	// I am not sure if it is needed at all
		"ramp_rightdoor"	// here in sections, just to be safe
	};
};

Model.cfg Animations

class Animations
	{	
	class ramp_leftdoor
		{
			type="rotation";
			source = "user";
			selection="ramp_leftdoor";		//part of the model to be animated
			axis="osa_leftdoor";		       //2 points give an axis in memory LOD
			memory=true;
			animPeriod=6.0;
			sourceAddress="clamp";
			minValue=0;
			maxValue=1;
			angle0=0;
			angle1="rad -40";		
			initPhase=0;
		};
		class ramp_rightdoor: ramp_leftdoor		//inheritance, 
		{
			selection="ramp_rightdoor";		       //you need to put here only those values 
			axis="osa_rightdoor";		               //which have to be changed
			angle0=0;
			angle1="rad 40";
		};
	};	

Config.cpp AnimationSources

               class AnimationSources
	{
		class ramp_leftdoor
		{
			source = "user";
			animPeriod = 6;
			initPhase = 0;
		};
		class ramp_rightdoor			//to simplify things you may inherit from class ramp_leftdoor since no values were changed
		{					        // ie.: class ramp_rightdoor: ramp_leftdoor {};
			source = "user";
			animPeriod = 6;
			initPhase = 0;
		};
	};

Config.cpp UserActions

               class UserActions
	{
		class doors_close
		{	
			displayName = "Close cargo doors";
			position = "pos cargo";			           //memory point where, in 5 m radius from that point action "Close cargo doors" is available
			radius = 5;
			condition = "(this animationPhase ""ramp_bottom"" < 0.1) AND (this animationPhase ""ramp_bottom2"" < 0.1) AND (this animationPhase ""ramp_leftdoor"" > 0.95) AND (this animationPhase ""ramp_rightdoor"" > 0.95)";
			statement = "this animate [""ramp_leftdoor"", 0]; this animate [""ramp_rightdoor"", 0]; this say ""mi6doors_close""";
			onlyforplayer = 0;
			priority = 5;
			showWindow = 0;
		};
		class doors_open
		{	
			displayName = "Open cargo doors";
			position = "pos cargo";
			radius = 5;
			condition = "(this animationPhase ""ramp_bottom"" < 0.1) AND (this animationPhase ""ramp_bottom2"" < 0.1) AND (this animationPhase ""ramp_leftdoor"" < 0.1) AND (this animationPhase ""ramp_rightdoor"" < 0.1)";
			statement = "this animate [""ramp_leftdoor"", 1]; this animate [""ramp_rightdoor"", 1]; this say ""mi6doors_open""";
			onlyforplayer = 0;
			priority = 5;
			showWindow = 0;
		};
	};	

Hope this help.

Share this post


Link to post
Share on other sites

So does this cause the model to have actions menu in game, like open cargo door? if your at the action point that's described? In O2 memory lod.

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  

×