Jump to content
Sign in to follow this  
bad benson

ladders don't work if placed in Visitor

Recommended Posts

first thing u need to know is that the BIS ladders work fine when i place them in visitor. the actual problem occurs when i place my custom building in visitor. the ladders just don't work ingame. but when i place my building via mission editor it works like a charm.

here's my config:

#define private		0
#define protected	1
#define public		2
#define true	        1
#define false	        0

class CfgPatches {
class BaBe_Objekte {
	units[] = {"BaBe_hut2"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAData"};
};
};

class CfgVehicleClasses {
class BaBe_Struct {
	displayName = "BaBe_Structures";
};
};

class CfgVehicles {
class House;	// External class reference

class BaBe_hut2 : House {
	scope = public;
	model = "\babe_buildings\h2";
	mapSize = 2;
	displayName = "Huette2";
	vehicleClass = "BaBe_Struct";
	nameSound = "Building";
	accuracy = 0.2;
	animated = false;
	ladders[] = {{"start1", "end1"}, {"start2", "end2"}};
	destrType = "DestructNo";
	cost = 0;
	armor = 10;
       };
};

Share this post


Link to post
Share on other sites

4 things are required...

  • 'Land_blah' for the class name.
  • The class should have a ladders[] array with sub-arrays for each ladder defining a start & end named selection (They can be called anything at all so long as they match the Mem. LoD).
  • The model should have these same named selections as points in the Memory LoD.
  • The model should have 'class=house' as a property in the Geometry LoD.

Ofcourse the should be no other errors or omissions. It's common for people to 'miss' the 'class=house' property from the Geom. LoD.

Opps. Actually, just thought... maybe wrong about that... 'class=house' might have been one of the pre-requisites for doors not so sure about ladders now that I think about it... give her a bash and see...

Edited by Synide

Share this post


Link to post
Share on other sites

Thank you Synide...

do not know if it was the "Land_blah" or the house in Geo LoD, got my ladders working now.:)

Share this post


Link to post
Share on other sites

Hi there,

I have the same problem but with BIS's ladders and gates...... any ideas how to fix that????

thanks in advance.

Edited by domador_de_yonkis

Share this post


Link to post
Share on other sites

I modeled a house (4 doors, 1 ladder).

Using the editor Arma2 to place my house: the animations work.

Using Visitor3 to place my house: the animation does not work.

No animation works (door and ladder), even with models BIS..

I must admit that I do not understand why.

The folder of my map is in "P\essai\" and is named "test"

The folder "essai" contains:

- folder "test" (my map), "CA" (*.cpp of addons ArmA2), "maison_briques_1" (*.cpp of my house).

The folder "test" contains:

- Files "*. cpp ","*. cfg" and "*. WRP.

- The folder "data" and "source".

The folder of my house is in "P" and is called "maison_briques_1"

This folder contains:

- Files: "*. cfg ","*. P3D ","*. cpp" and "*. csv".

- A folder "data" containing the textures and files "*. rvmat.

Here is the file "*. cpp" from my house :

#define true			1
#define false			0

#define VSoft			0
#define VArmor			1
#define VAir			2

#define LockNo			0
#define LockCadet		1
#define LockYes			2

#define private			0
#define protected		1
#define public			2

#define TEast			0
#define TWest			1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy			5
#define TFriendly		6
#define TLogic			7

#define ReadAndWrite		0
#define ReadAndCreate		1
#define ReadOnly		2
#define ReadOnlyVerified	3


class CfgPatches
{
class maisons_briques   //  = le nom du .pbo
       {
	units[] = {"maison_briques_1"};
	weapons[] = {};
	requiredVersion = 1.03;
	requiredAddons[] = {};
	version = "Beta 0";
	fileName = "maison_briques_1.pbo";
	author = "Akio";
	mail = "Akio@Test.FR";
};
};


class CfgVehicleClasses
{
class pfr_objets 
{
	displayName = "$STR_Maison_Briques";
};
};
class CfgFactionClasses
{
       class Akio
       {
              displayName = "Akio modele 3D";                        // Nom de la class Faction dans l'éditeur.
              priority = 1;
              side = 2;                                              // Camp TGuerrila (voir liste abrégé ci_dessus).
       };
};

class CfgVehicles
{
class Strategic;	// External class reference

class maison_briques_1 : Strategic
   {
	scope = 2;                                                            // public (voir liste abrégé ci-dessus).
	model = \maison_briques_1\maison_briques_1.p3d;                     // Nom et chemin du .p3d.
	picture             = \maison_briques_1\data\ico\picture_ca;                  //icon in command bar for vehicle
	preview             = \maison_briques_1\data\ico\preview_ca;  //editor preview picture
	Icon                = \maison_briques_1\data\ico\icon_ca;                //map icon. Full listing is available in P:\vbs2\customer\defines.hpp
	mapSize = 6;                                                          // Taille de l'icône dans l'éditeur.
	displayName = "$STR_MB_1";                                         // Nom de l'icône dans éditeur.
	vehicleClass = "pfr_objets";                                          // class du véhicule (voir ci-dessus).
	faction = "Akio";                                                     // Faction Akio.

	cost = 0;
	armor = 800;                                                // C'est la résistance à la destruction de l'objet.

	ladders[] =    {{"ladder_1_start","ladder_1_end"}};

	class AnimationSources 
	{
		class door_1		// Marquer le nom qui est défini à côté de "source" dans le fichier model.cfg
		{
			source = "user"; 
			animPeriod = 3;  
			initPhase=0;
		};
		class door_2		// Marquer le nom qui est défini à côté de "source" dans le fichier model.cfg
		{
			source = "user"; 
			animPeriod = 3;  
			initPhase=0;
		};
		class door_3		// Marquer le nom qui est défini à côté de "source" dans le fichier model.cfg
		{
			source = "user"; 
			animPeriod = 3;  
			initPhase=0;
		};
		class door_4		// Marquer le nom qui est défini à côté de "source" dans le fichier model.cfg
		{
			source = "user"; 
			animPeriod = 3;  
			initPhase=0;
		};
	};

	class UserActions 
	{
		class OpenDoors1 
		{
			displayName = "$STR_Open_Door_1";		// S'affiche devant le menu deroulant				
			position = "door_knob_1";			// Le nom de la poignée de la porte dans le LOD Memory
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_1"" < 0.5";
			statement = "this animate [""door_1"", 1]";
		};

		class CloseDoors1 
		{
			displayName = "$STR_Close_Door_1";
			position = "door_knob_1";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_1"" >= 0.5";
			statement = "this animate [""door_1"", 0]";
		};

		class OpenDoors2 
		{
			displayName = "$STR_Open_Door_2";
			position = "door_knob_2";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_2"" < 0.5";
			statement = "this animate [""door_2"", 1]";
		};

		class CloseDoors2 
		{
			displayName = "$STR_Close_Door_";
			position = "door_knob_2";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_2"" >= 0.5";
			statement = "this animate [""door_2"", 0]";
		};

		class OpenDoors3 
		{
			displayName = "$STR_Open_Door_3";
			position = "door_knob_3";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_3"" < 0.5";
			statement = "this animate [""door_3"", 1]";
		};

		class CloseDoors3 
		{
			displayName = "$STR_Close_Door_";
			position = "door_knob_3";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_3"" >= 0.5";
			statement = "this animate [""door_3"", 0]";
		};

		class OpenDoors4 
		{
			displayName = "$STR_Open_Door_4";
			position = "door_knob_4";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_4"" < 0.5";
			statement = "this animate [""door_4"", 1]";
		};

		class CloseDoors4 
		{
			displayName = "$STR_Close_Door_";
			position = "door_knob_4";
			radius = 3;
			onlyForPlayer = 0;
			condition = "this animationPhase ""door_4"" >= 0.5";
			statement = "this animate [""door_4"", 0]";
		};
	};
	actionBegin1 = OpenDoors1;
	actionEnd1 = CloseDoors1;
};
};

Here is the file "*. cfg" in my house :

class CfgSkeletons
{ 
 class Default;
 class maison_briques_1_Bones: Default 		// Le nom du fichier p3d suivi de _Bones
 {
  	isDiscrete=1;
  	skeletonInherit="";
  	skeletonBones[]=
{
	"door_1","",							// Le nom de chaque porte présent dans le LOD Geometry
	"door_2","",							// Pas de virgule après la derniere porte
	"door_3","",
	"door_4",""
};
 };
};

class rotation;
class cfgModels 
{
 class Default; 
class maison_briques_1: Default 			// Le nom du fichier p3d
{
	sectionsInherit="";
	skeletonName="maison_briques_1_Bones";	// Le nom du fichier p3d suivi de _Bones
	sections[]={};
	class Animations
	{
		class door_1: Rotation 
		{
			type = "rotation";				// Type d'animation pour une porte qui pivote sur un axe
			source="door_1";					// A marquer comme tel pour une porte et a reporter dans le fichier config.cpp "class AnimationSources/ class door"
			selection = "door_1";
			axis = "axis_door_1";			// Le nom donne aux charniere de la porte dans le LOD Memory
			memory = 1; 					// Est ce que les points de references se trouvent dans le LOD Memory 1=oui 0=non
			sourceAddress = "clamp";
			minValue = 0.0;
			maxValue = 1;
			angle0 = 0; 
			angle1 = 1.6; 				// Angle d'ouverture de la porte en degre
		};
		class door_2: Rotation 	
		{
			type = "rotation";
			source="door_2";
			selection = "door_2";
			axis = "axis_door_2";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0.0;
			maxValue = 1;
			angle0 = 0; 
			angle1 = 1.6;	
		};
		class door_3: Rotation 	
		{
			type = "rotation";
			source="door_3";
			selection = "door_3";
			axis = "axis_door_3";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0.0;
			maxValue = 1;
			angle0 = 0; 
			angle1 = "rad 90";

		};
		class door_4: Rotation 	
		{
			type = "rotation";
			source="door_4";
			selection = "door_4";
			axis = "axis_door_4";
			memory = 1; 
			sourceAddress = "clamp";
			minValue = 0.0;
			maxValue = 1;
			angle0 = 0; 
			angle1 = "rad 90";	
		};
	};
};
};

the folder that I binarizes with BinPBO is "P\essai\test"

Here are the files that I binarizes with BinPBO : *.cfg;*.p3d;*.rvmat;*.cpp;*.pac;*.paa;*.rtm;*.sqf; *.sqs;*.bikb;*.fsm;*.wss;*.ogg;*.wav;*.fxy;*.csv;* .html;*.lip;*.txt;*.wrp;*.bisurf

Named property Geometry LOD:

Property Name : map

Value : house

Property Name : class

Value : house

Property Name : dammage

Value : building

Property Name : autocenter

Value : 0

Thank you in advance for your help.

Edited by akio

Share this post


Link to post
Share on other sites

Typically the problem is caused by no config.cpp files available at time of Binarizing your project.

Have you unrapped all your Config.bin files inside your CA directory?

Does your CA contain ALL ArmA2 PBO's de-PBO'ed ?

When you BinPBO, switch on logging and tell us what the log says.

EDIT:

And when you have fixed that problem that affecting ALL buildings (including BIS), you need to take note of help elsewhere in this thread.

'Land_blah' for the class name.
Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

Hi Akio...

Haven't looked thru your files thoroughly so there may be other issues, but the first that immediately stands out are...

Classname must begin with "land_", and model name must match...

Try...

class land_maison_briques_1

and

filename="maison_briques_1.pbo"

in the config.cpp

*edit* - Gnat beat me to it! - what he says, including the fact that the "land" thing IS mentioned earlier in this very thread! ;)

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

It works.

It had to be changed (as you had told me):

class CfgVehicles
{
class Strategic;	// External class reference

class maison_briques_1 : Strategic

by

class CfgVehicles
{
class Strategic;	// External class reference

Land_class maison_briques_1 : Strategic

Thank you for your help (you really have to learn English, it will save me to use a translator to understand half of explanations).

Edited by akio

Share this post


Link to post
Share on other sites

Just checking

You have

Land_class maison_briques_1 : Strategic

or

class Land_maison_briques_1 : Strategic

Share this post


Link to post
Share on other sites

class Land_maison_briques_1 : Strategic

is what it should be...

B

Edited by Bushlurker

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  

×