Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Declaration as Addon-Content.*/
- class CfgPatches {
- /* "Hey ArmA2, this is an addon and it's named "TUT_Wall"*/
- /* The name should be indentical to the folder's name*/
- class TUT_Walls {
- units[] = {};
- weapons[] = {};
- requiredVersion = 0.1;
- requiredAddons[] = {};
- };
- };
- /* The category in the editor like "Objects" or "Cars".*/
- class CfgVehicleClasses {
- class TUT_WallsVehicleClass {
- displayName = "TUT Walls";
- };
- };
- /* This is where arma gets the information about a new object. */
- /* Donät be confused by the "vehicles" in CfgVehicles*/
- class CfgVehicles {
- /* everything between here and "Class Land_ ..." is important for the animation to work properly without any "lags". */
- class All;
- class HouseBase;
- class Ruins: HouseBase {};
- /* Again your very own basic definition*/
- class TUT_Base_Object : All {
- scope = 0;
- side = 3;
- icon = "iconStaticObject";
- nameSound = "object";
- simulation = "house";
- picture = "pictureStaticObject";
- model="";
- sound = "Building";
- placement = "vertical";
- ladders[] = {};
- vehicleClass = "";
- displayName = "";
- coefInside = 1;
- coefInsideHeur = 0.25;
- mapSize = 7.5;
- animated = true;
- armor = 200;
- destrType = "DestructBuilding";
- damageResistance = 0.004;
- class DestructionEffects {
- class Sound {
- simulation = "sound";
- type = "DestrHouse";
- position = "destructionEffect1";
- intensity = 1;
- interval = 1;
- lifeTime = 0.05;
- };
- class DestroyPhase1 {
- simulation = "destroy";
- type = "DelayedDestruction";
- lifeTime = 2.5;
- position = "";
- intensity = 1;
- interval = 1;
- };
- class DamageAround1 {
- simulation = "damageAround";
- type = "DamageAroundHouse";
- position = "";
- intensity = 1;
- interval = 1;
- lifeTime = 1;
- };
- };
- };
- /* Your very own base class for buildings*/
- class TUT_Housebase : TUT_Base_Object {
- scope = 1;
- model = "";
- icon = "";
- displayName = "";
- animated = true;
- vehicleClass = "TUT_WallsVehicleClass";
- nameSound = "house";
- accuracy = 0.2;
- typicalCargo[] = {};
- transportAmmo = 0;
- transportRepair = 0;
- transportFuel = 0;
- mapSize = 11;
- cost = 0;
- armor = 800;
- /*extern*/ class DestructionEffects;
- };
- /* Everything between here and "Class All" (above) is important for the animation to work without any "lags". */
- /* The "Land_" infront of all buildings is important for the destructioneffects to work properly. After the "Land_" the name of the .p3d (without the .p3d ending) has to follow!*/
- class Land_TUT_Wall_3x3m: TUT_Housebase {
- model = "\TUT_Walls\TUT_Wall_3x3m.p3d"; /* path to the object */
- displayName = "$STR_TUT_Wall"; /* entry in Stringtable.csv */
- /* Important are the $ and the capital STR_*/
- nameSound = "";
- mapSize = 8; /* Size of the icon */
- icon = "iconStaticObject"; /* Path to the picture shown in the editor. */
- accuracy = 1000;
- armor = 450; /* "Lifepoints", if you like to call it that way.*/
- destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
- scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
- class DestructionEffects : DestructionEffects
- {
- class Ruin1
- {
- simulation = "ruin";
- type = "\TUT_Walls\TUT_Wall_3x3m_Ruin"; /* path to the object*/
- /* Warning, if you use a custom rubble model, it has to be defined in the cfgvehicles (see below)*/
- position = "";
- intensity = 1;
- interval = 1;
- lifeTime = 1;
- };
- };
- };
- /* Same name as stated in the Class DestructionEffects, but an "Land_" added infront*/
- class Land_TUT_Wall_3x3m_Ruin : ruins {
- scope = 1;
- model = "\TUT_Walls\TUT_Wall_3x3m_Ruin.p3d";
- displayName = "Wall ruins";
- };
- /* Your doorsegment is derivated from the normal wall.*/
- class Land_TUT_Door_3x3m: Land_TUT_Wall_3x3m {
- model = "\TUT_Walls\TUT_Door_3x3m.p3d";
- displayName = "$STR_TUT_Door";
- /* Arma needs to know, how the animation trigger is triggered*/
- class AnimationSources {
- /* name must be identical to the one given by the model.cfg ("Open_Door")" */
- class Open_Door {
- source = "user";
- animPeriod = 4; /* duration in seconds */
- initPhase = 0;
- };
- };
- /* The entry to the actionmenu */
- class UserActions
- {
- class Open_Door
- {
- displayName="$STR_TUT_OpenDoor";
- onlyforplayer = true;
- position="Door_knopf";
- radius=2; /* visibility distance of the entry */
- condition="this animationPhase ""Open_Door"" < 0.5";
- statement="this animate [""Open_Door"", 1]";
- };
- class Close_Door : Open_Door
- {
- displayName="$STR_TUT_CloseDoor";
- condition="this animationPhase ""Open_Door"" >= 0.5";
- statement="this animate [""Open_Door"", 0]";
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement