Jump to content

Recommended Posts

Hey guys,

 

I have created several buildings and objects to use them on my terrain. After placing them with the terrain builder and exporting them ingame, the doors are not working anymore. No scroll option either. In EDEN everything is working perfect!

 

Here´s my object class and model.cfg

class CfgVehicles 
{ 
  class Static;
  class PDE_larmschutz_tur : Static
  {
      author = "Prodeath21";
      displayName = "$STR_PDE_larmschutz_tur";
      scope = 2;
      scopecurator = 2;
      model = "\projekt_deutschland_structures\larmschutz\larmschutz_tur.p3d";
      icon = "iconObject_4x1";
      editorCategory = "PDE_Addon";
      editorSubcategory = "PDE_larmschutz";
      editorPreview = "\projekt_deutschland_structures\larmschutz\icons\preview_PDE_larmschutz_tur.jpg";

      class AnimationSources
      {
          class Door_1_sound_source
          {
              source = "user";
              initPhase = 0;
              animPeriod = 1;
              sound = "MetalOldDoorsSound"; 		//From: A3\sounds_f\config.cpp
              soundPosition = "Door_1_trigger";
          };
          class Door_1_noSound_source
          {
              source = "user";
              initPhase = 0;
              animPeriod = 1;
          };
          class Door_1_locked_source
          {
              source = "user";
              initPhase = 0;
              animPeriod = 0.80000001;
          };
      };
      class UserActions
      {
          class OpenDoor
           {
              displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
              displayName = "$STR_DN_OUT_O_DOOR";
              position = "Door_1_trigger";
              priority = 1;
              actionNamedSel = "door";
              radius = 2;
              aiMaxRange = 5.25;
              onlyForPlayer = 0;
              condition = "((this animationSourcePhase 'Door_1_sound_source') < 0.5) && (cameraOn isKindOf 'CAManBase')";
              statement = "([this, 1, 1] call BIS_fnc_Door)";
          };
          class CloseDoor: OpenDoor
          {
              displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
              displayName = "$STR_DN_OUT_C_DOOR";
              priority = 1;
              condition = "((this animationSourcePhase 'Door_1_sound_source') >= 0.5) && ((this getVariable ['bis_disabled_Door_1', 0]) != 1) && (cameraOn isKindOf 'CAManBase')";
              statement = "([this, 1, 0] call BIS_fnc_Door)";
          };
      };
   };
};

 

My P3D name: "larmschutz_tur.p3d"

class CfgSkeletons
{
	class Default
	{
		isDiscrete = 1;
		skeletonInherit = "";
		skeletonBones[] = {};
	};
	
	class PDE_larmschutz_sceleton: Default
	{
		skeletonInherit = "Default";
		skeletonBones[]=
		{
			"", ""
		};
	};
	class PDE_larmschutz_tur_sceleton: Default
	{
		skeletonInherit = "Default";
		skeletonBones[]=
		{
			"door", ""
		};
	};
};

class CfgModels
{
	class Default
	{
		skeletonName="";
		sections[]={};
		sectionsInherit="";
	};
	
	class larmschutz: Default
	{
		skeletonName="PDE_larmschutz_sceleton";
		sections[]={""};
		sectionsInherit="";
	};
	
	class larmschutz_tur: larmschutz
	{
		skeletonName="PDE_larmschutz_tur_sceleton";
		sections[]={""};
		
		class Animations
		{
			class Door_1
			{
				type = rotation;
				source = Door_1_sound_source;
				selection = door;
				axis = door_axis;
				memory = 1;
				minValue = 0.1;
				maxValue = 1;
				angle0 = 0;
				angle1 = (rad 80);
			};
		};
	};
};

In the Geometry LOD I added the propertys "class = building", "map = wall"

 

I allready tryed for 2 weeks without a solution...

Thx for your help! :)

 

Share this post


Link to post
Share on other sites

Shot in the dark....you are not using pboproject to pack your addon are you?

Share this post


Link to post
Share on other sites
7 minutes ago, Prodeath21 said:

I am using mikeros 🙂


ok well that takes one thing out of the equation. Good. Try inheriting from class house_f instead of static. 
 

    class House;
        class House_F: House
        {
            class DestructionEffects;
        };
        class Ruins_F;

 

class Land_PDE_larmschutz_tur : House_F

{ ect.....
 

 

edit...you need the land_ xxx for the animations to work

Share this post


Link to post
Share on other sites

Solution:

 

Hey,

I added the class´s you mentioned above, but it was still not working. In the end I found out, that > vehicleClass = "Structures"; < was missing. After adding it everything was working.

 

Here´s my final config:

class CfgVehicles 
{ 
  class House;
  class House_F: House
  {
	  class DestructionEffects;
  };
  class Ruins_F;
  class Land_PDE_larmschutz_tur : House_F
  {
      author = "Prodeath21";
      displayName = "$STR_PDE_larmschutz_tur";
      scope = 2;
      scopecurator = 2;
      model = "\projekt_deutschland_structures\larmschutz\larmschutz_tur.p3d";
      icon = "iconObject_4x1";
      editorCategory = "PDE_Addon";
      editorSubcategory = "PDE_larmschutz";
      editorPreview = "\projekt_deutschland_structures\larmschutz\icons\preview_PDE_larmschutz_tur.jpg";
      vehicleClass = "Structures"; //NEW

      class AnimationSources
      {
          class Door_1_sound_source
          {
              source = "user";
              initPhase = 0;
              animPeriod = 1;
              sound = "MetalOldDoorsSound"; 		//From: A3\sounds_f\config.cpp
              soundPosition = "Door_1_trigger";
          };
          class Door_1_noSound_source
          {
              source = "user";
              initPhase = 0;
              animPeriod = 1;
          };
          class Door_1_locked_source
          {
              source = "user";
              initPhase = 0;
              animPeriod = 0.80000001;
          };
      };
      class UserActions
      {
          class OpenDoor
           {
              displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
              displayName = "$STR_DN_OUT_O_DOOR";
              position = "Door_1_trigger";
              priority = 1;
              actionNamedSel = "door";
              radius = 2;
              aiMaxRange = 5.25;
              onlyForPlayer = 0;
              condition = "((this animationSourcePhase 'Door_1_sound_source') < 0.5) && (cameraOn isKindOf 'CAManBase')";
              statement = "([this, 1, 1] call BIS_fnc_Door)";
          };
          class CloseDoor: OpenDoor
          {
              displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
              displayName = "$STR_DN_OUT_C_DOOR";
              priority = 1;
              condition = "((this animationSourcePhase 'Door_1_sound_source') >= 0.5) && ((this getVariable ['bis_disabled_Door_1', 0]) != 1) && (cameraOn isKindOf 'CAManBase')";
              statement = "([this, 1, 0] call BIS_fnc_Door)";
          };
      };
   };
};

Thanks for your help!

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

×