Jump to content
Sign in to follow this  
Richards.D

Static Barrier Config

Recommended Posts

Hello gentlemen:

After making a tutorial addon, I decided I would try and make something with some mild useful-ness. I built and textured a TBarrier. When I put it in game as classed as "Thing" although it weighed over 2000KG any car, or even bullets could knock it over, and push it. I need it so it does not move at all, and can take substantial punishment before falling over. I tried this on my config, but to no avail. I cannot find it anywhere in the editor under this setting.

class CfgPatches
{
   class DAR_Wall
   {
       units[] = {"DAR_Wall"};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"CAData"};
   };
};
class CfgVehicles
{
   class Static;
   class DAR_Wall: Static
   {
       scope = 2;
       displayName = "TBarrier Wall";
       model = "\DAR_TBar\DAR_TBar.p3d";
       armor = 200000;
   };
}; 

Thank you.

Share this post


Link to post
Share on other sites

destrType = "DestructNo"; (no damage) or

destrType = "DestructBuilding"; (then you can see the black dots, if the bulletts hit your target

and i mean you have to do

class CfgVehicles
{
   class Static;
   class [color="#FF0000"]Land_[/color]DAR_Wall: Static 
....
};

And dont forget to set a "mass" in the geo-lod!! How to do look here: http://community.bistudio.com/wiki/Mondkalb%27s_Addon_Tutorial#Geometry_LOD:

Share this post


Link to post
Share on other sites

Hello, and thank you for the response. I set a mass of like.. 10k kgs in the Geo LOD while making, didn't seem to make a difference. I shall try this solution and see how it works.

---------- Post added at 14:46 ---------- Previous post was at 14:40 ----------

Hello, and thank you for the response. I set a mass of like.. 10k kgs in the Geo LOD while making, didn't seem to make a difference. I shall try this solution and see how it works.

Alright.. I've taken a slightly different direction with the config, and although I incorporated your fixes, I STILL cannot find the silly thing in the editor!! :mad:

Posting config again..

class CfgPatches {
   class dar_objects {
       units[] = {"DAR_Wall"};
       weapons[] = {""};

   };
};

class cfgVehicleClasses {
class dar_objects {
	displayName = "DAR Objects";
};
};

class CfgVehicles {
   class House;

class DAR_Wall: House {
vehicleClass = "dar_objects";
accuracy = 0.2;	// accuracy needed to recognize type of this target
scope = public;
simulation = "House";
camouflage = 10;	// how dificult to spot - bigger - better spotable
Audible = 10;	// audible - bigger - better heard
mapSize = 0.2;
cost = 1000;

       // threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
threat[] = {1, 1, 1};

       armor = 5000;
irtarget = false;
destrType = "DestructNo";
lasertarget = false;
side = TCivilian;
displayName = "T Barrier";
animated = false;
model = "\dar_objects\DAR_TBar.p3d";
   };
}; 

Share this post


Link to post
Share on other sites

Change it to

class CfgVehicleClasses {

class dar_objectsVehicleClass {

displayName = "DAR Objects";

};

{

class house; //loading the basics

class Land_DAR_Wall : House

{

vehilceClass = "dar_objects"; // that shows the defined name in cfgvehilceclass >> DAR Objects<<

model="xxx\xxx\dar_wall.p3d"; // thats the folder to your model

display = "DAR Wall"; // that shows you DAR WALL if you have open DAR Objects

...

};

Edited by Drunken Officer

Share this post


Link to post
Share on other sites

So, like this?

class Land_DAR_Wall: House {
vehicleClass = "dar_objects";

(Omitted rest of config above and below line 18)

that shows the defined name in cfgvehilceclass

wait,, what? I need to define this custom or something?


How does this look?

class CfgPatches {
   class dar_objects {
       units[] = {"DAR_Wall"};
       weapons[] = {""};

   };
};

class CfgVehicleClasses {
class dar_objectsVehicleClass {
displayName = "DAR Objects";
};
};

{
class house; //loading the basics
class Land_DAR_Wall : House
{
vehilceClass = "dar_objects"; // that shows the defined name in cfgvehilceclass >> DAR Objects<<
model="xxx\xxx\dar_wall.p3d"; // thats the folder to your model
display = "DAR Wall"; // that shows you DAR WALL if you have open DAR Objects

};
};

class CfgVehicles {
   class House;

class DAR_Wall: House {
vehicleClass = "dar_objects";
accuracy = 0.2;	// accuracy needed to recognize type of this target
scope = public;
simulation = "House";
camouflage = 10;	// how dificult to spot - bigger - better spotable
Audible = 10;	// audible - bigger - better heard
mapSize = 0.2;
cost = 1000;

       // threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
threat[] = {1, 1, 1};

       armor = 5000;
irtarget = false;
destrType = "DestructNo";
lasertarget = false;
side = TCivilian;
displayName = "T Barrier";
animated = false;
model = "\dar_objects\DAR_TBar.p3d";
   };
}; 


Edited by RichardsD

Share this post


Link to post
Share on other sites

Try this

class CfgPatches
{
class dar_objects
{
	units[] = {"DAR_Wall"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAData"};
};
};

class CfgVehicleClasses
{
class dar_objects
{
	displayName = "DAR Objects";
};
};

class CfgVehicles
{
class House;
class DAR_Wall: House//Wall
{
	scope = 2;
	displayName = "T Barrier";
	vehicleClass = "dar_objects";
	model = "\dar_objects\DAR_TBar.p3d";
	mapSize = 0.2;
	cost = 1000;
	armor = 5000;
	destrType = "DestructNo";
};
};

Share this post


Link to post
Share on other sites

Thank you both for the assistance!

I'm currently putting the final finishes on my first addon.. Once I figure out how to make keys I will distribute my first addon!

I'll get some photos soon..

Share this post


Link to post
Share on other sites

Q's example is nearly 100% correct. Please, always when you create objects, use the LAND_ tag, it will make it easier for terrain makers to use your objects if they wish to.

    class land_DAR_TBar: House//Wall 
   { 
       scope = 2; 
       displayName = "T Barrier"; 
       vehicleClass = "dar_objects"; 
       model = "\dar_objects\DAR_TBar.p3d"; 
       mapSize = 0.2; 
       cost = 1000; 
       armor = 5000; 
       destrType = "DestructNo"; 
   };

That's it.

To recap, use "LAND_" and then suffix it with your .p3d's name, but without the .p3d extension.

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  

×