Advertisement
Guest User

Config.cpp

a guest
May 7th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. //Basic Definitions
  2. #define true 1
  3. #define false 0
  4.  
  5. #define VSoft 0
  6. #define VArmor 1
  7. #define VAir 2
  8.  
  9. #define private 0
  10. #define protected 1
  11. #define public 2
  12.  
  13. #define TEast 0
  14. #define TWest 1
  15. #define TGuerrila 2
  16. #define TCivilian 3
  17. #define TSideUnknown 4
  18. #define TEnemy 5
  19. #define TFriendly 6
  20. #define TLogic 7
  21.  
  22. #define ReadAndWrite 0
  23. #define ReadAndCreate 1
  24. #define ReadOnly 2
  25. #define ReadOnlyVerified 3
  26.  
  27. #define DefaultManWeapons Throw,Put
  28.  
  29. /* Declaration as Addon-Content.*/
  30. class CfgPatches {
  31. /* "Hey ArmA2, this is an addon and it's named "TUT_Wall"*/
  32. /* The name should be indentical to the folder's name*/
  33. class TUT_Walls {
  34. units[] = {};
  35. weapons[] = {};
  36. requiredVersion = 0.1;
  37. requiredAddons[] = {};
  38. };
  39. };
  40.  
  41. /* The category in the editor like "Objects" or "Cars".*/
  42. class CfgVehicleClasses {
  43.  
  44. class TUT_WallsVehicleClass {
  45. displayName = "TUT Walls";
  46. };
  47. };
  48.  
  49. /* This is where arma gets the information about a new object. */
  50. /* Donät be confused by the "vehicles" in CfgVehicles*/
  51. class CfgVehicles {
  52. /* everything between here and "Class Land_ ..." is important for the animation to work properly without any "lags". */
  53.  
  54. class All;
  55.  
  56. class HouseBase;
  57.  
  58. class Ruins: HouseBase {};
  59.  
  60. /* Again your very own basic definition*/
  61. class TUT_Base_Object : All {
  62. scope = 0;
  63. side = 3;
  64. icon = "iconStaticObject";
  65. nameSound = "object";
  66. simulation = "house";
  67. picture = "pictureStaticObject";
  68. model="";
  69. sound = "Building";
  70. placement = "vertical";
  71. ladders[] = {{"start1","end1"}};
  72. vehicleClass = "";
  73. displayName = "";
  74. coefInside = 1;
  75. coefInsideHeur = 0.25;
  76. mapSize = 7.5;
  77. animated = true;
  78. armor = 200;
  79. destrType = "DestructBuilding";
  80. damageResistance = 0.004;
  81.  
  82. class DestructionEffects {
  83. class Sound {
  84. simulation = "sound";
  85. type = "DestrHouse";
  86. position = "destructionEffect1";
  87. intensity = 1;
  88. interval = 1;
  89. lifeTime = 0.05;
  90. };
  91.  
  92. class DestroyPhase1 {
  93. simulation = "destroy";
  94. type = "DelayedDestruction";
  95. lifeTime = 2.5;
  96. position = "";
  97. intensity = 1;
  98. interval = 1;
  99. };
  100.  
  101. class DamageAround1 {
  102. simulation = "damageAround";
  103. type = "DamageAroundHouse";
  104. position = "";
  105. intensity = 1;
  106. interval = 1;
  107. lifeTime = 1;
  108. };
  109. };
  110. };
  111.  
  112. /* Your very own base class for buildings*/
  113. class TUT_Housebase : TUT_Base_Object {
  114. scope = 1;
  115. model = "";
  116. icon = "";
  117. displayName = "";
  118. animated = true;
  119. vehicleClass = "TUT_WallsVehicleClass";
  120. nameSound = "house";
  121. accuracy = 0.2;
  122. typicalCargo[] = {};
  123. transportAmmo = 0;
  124. transportRepair = 0;
  125. transportFuel = 0;
  126. mapSize = 11;
  127. cost = 0;
  128. armor = 800;
  129. /*extern*/ class DestructionEffects;
  130. };
  131. /* Everything between here and "Class All" (above) is important for the animation to work without any "lags". */
  132. /* 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!*/
  133.  
  134. class Land_TUT_Wall_3x3m: TUT_Housebase {
  135. model = "\TUT_Walls\TUT_Wall_3x3m"; /* path to the object */
  136. displayName = "TUT_Wall"; /* entry in Stringtable.csv */
  137. /* Important are the $ and the capital STR_*/
  138. nameSound = "";
  139. mapSize = 8; /* Size of the icon */
  140. icon = "iconStaticObject"; /* Path to the picture shown in the editor. */
  141. accuracy = 1000;
  142. armor = 450; /* "Lifepoints", if you like to call it that way.*/
  143. destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
  144. scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
  145.  
  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. class Open_Door2 {
  154. source = "user";
  155. animPeriod = 4; /* duration in seconds */
  156. initPhase = 0;
  157.  
  158. class DestructionEffects : DestructionEffects
  159. {
  160.  
  161. class Ruin1
  162. {
  163. simulation = "ruin";
  164. type = "\TUT_Walls\TUT_Wall_3x3m_Ruin"; /* path to the object*/
  165. /* Warning, if you use a custom rubble model, it has to be defined in the cfgvehicles (see below)*/
  166. position = "";
  167. intensity = 1;
  168. interval = 1;
  169. lifeTime = 1;
  170.  
  171. /* Same name as stated in the Class DestructionEffects, but an "Land_" added infront*/
  172. class Land_TUT_Wall_3x3m_Ruin : ruins {
  173. scope = 1;
  174. model = "\TUT_Walls\TUT_Wall_3x3m_Ruin";
  175. displayName = "Wall ruins";
  176.  
  177. };
  178.  
  179. class UserActions
  180. {
  181. class Open_Door
  182. {
  183. displayName="Opendoor";
  184. onlyforplayer = true;
  185. position="Door_knopf";
  186. radius=2; /* visibility distance of the entry */
  187. condition="this animationPhase ""Open_Door"" < 0.5";
  188. statement="this animate [""Open_Door"", 1]";
  189. };
  190. class Close_Door : Open_Door
  191. {
  192. displayName="closedoor";
  193. condition="this animationPhase ""Open_Door"" >= 0.5";
  194. statement="this animate [""Open_Door"", 0]";
  195. };
  196. class Open_Door2
  197. {
  198. displayName="Opendoor2";
  199. onlyforplayer = true;
  200. position="Door2_knopf";
  201. radius=2; /* visibility distance of the entry */
  202. condition="this animationPhase ""Open_Door2"" < 0.5";
  203. statement="this animate [""Open_Door2"", 1]";
  204. };
  205. class Close_Door2 : Open_Door2
  206. {
  207. displayName="closedoor2";
  208. condition="this animationPhase ""Open_Door2"" >= 0.5";
  209. statement="this animate [""Open_Door2"", 0]";
  210. };
  211.  
  212. };
  213. };
  214. };
  215. };
  216. };
  217. };
  218. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement