Advertisement
Guest User

Config.cpp

a guest
May 6th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. /* Declaration as Addon-Content.*/
  2. class CfgPatches {
  3. /* "Hey ArmA2, this is an addon and it's named "TUT_Wall"*/
  4. /* The name should be indentical to the folder's name*/
  5. class TUT_Walls {
  6. units[] = {};
  7. weapons[] = {};
  8. requiredVersion = 0.1;
  9. requiredAddons[] = {};
  10. };
  11. };
  12.  
  13. /* The category in the editor like "Objects" or "Cars".*/
  14. class CfgVehicleClasses {
  15.  
  16. class TUT_WallsVehicleClass {
  17. displayName = "TUT Walls";
  18. };
  19. };
  20.  
  21. /* This is where arma gets the information about a new object. */
  22. /* Donät be confused by the "vehicles" in CfgVehicles*/
  23. class CfgVehicles {
  24. /* everything between here and "Class Land_ ..." is important for the animation to work properly without any "lags". */
  25.  
  26. class All;
  27.  
  28. class HouseBase;
  29.  
  30. class Ruins: HouseBase {};
  31.  
  32. /* Again your very own basic definition*/
  33. class TUT_Base_Object : All {
  34. scope = 0;
  35. side = 3;
  36. icon = "iconStaticObject";
  37. nameSound = "object";
  38. simulation = "house";
  39. picture = "pictureStaticObject";
  40. model="";
  41. sound = "Building";
  42. placement = "vertical";
  43. ladders[] = {};
  44. vehicleClass = "";
  45. displayName = "";
  46. coefInside = 1;
  47. coefInsideHeur = 0.25;
  48. mapSize = 7.5;
  49. animated = true;
  50. armor = 200;
  51. destrType = "DestructBuilding";
  52. damageResistance = 0.004;
  53.  
  54. class DestructionEffects {
  55. class Sound {
  56. simulation = "sound";
  57. type = "DestrHouse";
  58. position = "destructionEffect1";
  59. intensity = 1;
  60. interval = 1;
  61. lifeTime = 0.05;
  62. };
  63.  
  64. class DestroyPhase1 {
  65. simulation = "destroy";
  66. type = "DelayedDestruction";
  67. lifeTime = 2.5;
  68. position = "";
  69. intensity = 1;
  70. interval = 1;
  71. };
  72.  
  73. class DamageAround1 {
  74. simulation = "damageAround";
  75. type = "DamageAroundHouse";
  76. position = "";
  77. intensity = 1;
  78. interval = 1;
  79. lifeTime = 1;
  80. };
  81. };
  82. };
  83.  
  84. /* Your very own base class for buildings*/
  85. class TUT_Housebase : TUT_Base_Object {
  86. scope = 1;
  87. model = "";
  88. icon = "";
  89. displayName = "";
  90. animated = true;
  91. vehicleClass = "TUT_WallsVehicleClass";
  92. nameSound = "house";
  93. accuracy = 0.2;
  94. typicalCargo[] = {};
  95. transportAmmo = 0;
  96. transportRepair = 0;
  97. transportFuel = 0;
  98. mapSize = 11;
  99. cost = 0;
  100. armor = 800;
  101. /*extern*/ class DestructionEffects;
  102. };
  103. /* Everything between here and "Class All" (above) is important for the animation to work without any "lags". */
  104. /* 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!*/
  105.  
  106. class Land_TUT_Wall_3x3m: TUT_Housebase {
  107. model = "\TUT_Walls\TUT_Wall_3x3m.p3d"; /* path to the object */
  108. displayName = "$STR_TUT_Wall"; /* entry in Stringtable.csv */
  109. /* Important are the $ and the capital STR_*/
  110. nameSound = "";
  111. mapSize = 8; /* Size of the icon */
  112. icon = "iconStaticObject"; /* Path to the picture shown in the editor. */
  113. accuracy = 1000;
  114. armor = 450; /* "Lifepoints", if you like to call it that way.*/
  115. destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
  116. scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
  117. class DestructionEffects : DestructionEffects
  118. {
  119.  
  120. class Ruin1
  121. {
  122. simulation = "ruin";
  123. type = "\TUT_Walls\TUT_Wall_3x3m_Ruin"; /* path to the object*/
  124. /* Warning, if you use a custom rubble model, it has to be defined in the cfgvehicles (see below)*/
  125. position = "";
  126. intensity = 1;
  127. interval = 1;
  128. lifeTime = 1;
  129. };
  130. };
  131. };
  132.  
  133. /* Same name as stated in the Class DestructionEffects, but an "Land_" added infront*/
  134. class Land_TUT_Wall_3x3m_Ruin : ruins {
  135. scope = 1;
  136. model = "\TUT_Walls\TUT_Wall_3x3m_Ruin.p3d";
  137. displayName = "Wall ruins";
  138. };
  139.  
  140. /* Your doorsegment is derivated from the normal wall.*/
  141. class Land_TUT_Door_3x3m: Land_TUT_Wall_3x3m {
  142. model = "\TUT_Walls\TUT_Door_3x3m.p3d";
  143. displayName = "$STR_TUT_Door";
  144.  
  145. /* Arma needs to know, how the animation trigger is triggered*/
  146. class AnimationSources {
  147. /* name must be identical to the one given by the model.cfg ("Open_Door")" */
  148. class Open_Door {
  149. source = "user";
  150. animPeriod = 4; /* duration in seconds */
  151. initPhase = 0;
  152. };
  153. };
  154.  
  155. /* The entry to the actionmenu */
  156. class UserActions
  157. {
  158. class Open_Door
  159. {
  160. displayName="$STR_TUT_OpenDoor";
  161. onlyforplayer = true;
  162. position="Door_knopf";
  163. radius=2; /* visibility distance of the entry */
  164. condition="this animationPhase ""Open_Door"" < 0.5";
  165. statement="this animate [""Open_Door"", 1]";
  166. };
  167. class Close_Door : Open_Door
  168. {
  169. displayName="$STR_TUT_CloseDoor";
  170. condition="this animationPhase ""Open_Door"" >= 0.5";
  171. statement="this animate [""Open_Door"", 0]";
  172. };
  173. };
  174. };
  175. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement