Jump to content
Sign in to follow this  
odyseus

Vehicle User action

Recommended Posts

Hello guys, I am trying to introduce to my vehicle a formation light. I am having problem the user action does not appear on the list. Can someone please explain how to do this.

So this is what i did.

1 Added the model and the texture and the material in the p3d Lod 1

2 Added on the model config

class CfgSkeletons 
{
  class Plane;
  class BRAF_A29Skeleton: Plane  
   { 
       isDiscrete=1; 
       skeletonInherit="";
       skeletonBones[]= 
       { 	
		"formationlights","",

3 Added this to the model config

class Rotation;
class CfgModels
{
   class Plane;
   class BRAF_A29A: Plane
   {
       skeletonName = "BRAF_A29Skeleton";
       sectionsInherit="";
       sections[] = {"skin","vrtule","vrtule staticka","vrtule blur","aileron_1","aileron_2","rudder","elevator","Light_wing_L","Light_wing_R","zasleh","zbytek","sklo predni L","camo1","podsvit pristroju","Light_L",
		"Light_R",
		"Light_L_hitpoint",
		"Light_R_hitpoint"};

       class Animations
       {

			class FormationLights
		{
			type="hide";
			hideValue=0;
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			source="user";
			sourceAddress=0;
			selection="formationlights";
		};

4 added this to the config cpp

class AnimationSources: AnimationSources 
	{

		class FormationLights{
			source = "user";
			animPeriod = 0.001;
			initPhase = 0;
		};


class UserActions
		{	
			class FormationON
			{
				displayName = "Formation lights on";
				displayNameDefault = "Formation lights on";
				position = "zamerny";
				radius = 1;
				onlyForPlayer = "true";
				condition = "(player==driver this OR player==gunner this)and(this animationphase ""FormationLights"" != 1)";
				statement = "this animate [""FormationLights"",1];";
				showWindow = 0;
				priority = -1;
				source = "user";
			};
			class FormationOFF
			{
				displayName = "Formation lights off";
				displayNameDefault = "Formation lights off";
				position = "zamerny";
				radius = 1;
				onlyForPlayer = "true";
				condition = "(player==driver this OR player==gunner this)and(this animationphase ""FormationLights"" != 0)";
				statement = "this animate [""FormationLights"",0];";
				showWindow = 0;
				priority = -1;
				source = "user";
			};
	    };
	};

Can someone help please

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  

×