Advertisement
Guest User

Untitled

a guest
Jun 28th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. // Note: this model config is created with 4-space [tab] symbols. If you use different settings, the structure may not be as clear.
  2. class CfgSkeletons
  3. {
  4. class Default
  5. {
  6. isDiscrete = 1;
  7. skeletonInherit = "";
  8. skeletonBones[] = {};
  9. };
  10.  
  11. // Skeleton of undamaged variant of the house, containing doors and windows. Note that glass #3 is not a window but the glass pane of glass door (door #1). Therefore
  12. // (similar to door handles) it's bones need to be appropriately linked to bones of the door so that it moves along with it when the door is opened/closed.
  13. class m_bat_entreprise_skeleton: Default
  14. {
  15. skeletonInherit = "Default";
  16. skeletonBones[] =
  17. {
  18. // Pairs: 1st is newly defined bone, second is it`s "parent" in the skeleton (bone hierarchy).
  19. "Door_1", "",
  20.  
  21. "Door_2", "",// Same goes for the axis around which rotates the handle itself.
  22.  
  23. "Door_3", "",
  24.  
  25. "Door_4", "",
  26.  
  27. "Door_5", "",
  28.  
  29. "Door_6", "",
  30.  
  31. "Door_7", "",
  32.  
  33. "Door_8", ""
  34. };
  35. };
  36.  
  37. // Skeleton of damaged variant of the house. It has no bones for windows (since all windows are destroyed); on the other hand it has bones for destroyable parts (Dam_#) and their rubble (Unhide_#).
  38. // Doors are bound to these destroyable parts of they are part of them, so that they are hidden together by one animation.
  39. class m_bat_entreprise_dam_F_skeleton: Default
  40. {
  41. skeletonInherit = "Default";
  42. skeletonBones[] =
  43. {
  44. "Door_1", "",
  45.  
  46. "Door_2", "",
  47.  
  48. "Door_3", "",
  49.  
  50. "Door_4", "",
  51.  
  52. "Door_5", "",
  53.  
  54. "Door_6", "",
  55.  
  56. "Door_7", "",
  57.  
  58. "Door_8", ""
  59. };
  60. };
  61. };
  62.  
  63. class CfgModels
  64. {
  65. class Default
  66. {
  67. sectionsInherit = "";
  68. sections[] = {};
  69. skeletonName = "";
  70. };
  71.  
  72. class m_bat_entreprise: Default // class name must be the same as name of p3d
  73. {
  74. skeletonName = "m_bat_entreprise_skeleton"; // Set to use above defined skeleton.
  75. sections[] =
  76. {
  77. // Selections from the model that are used in config.cpp for switching textures and materials.
  78. "DamT_1",
  79. "Glass_1_hide",
  80. "Glass_2_hide",
  81. "Glass_3_hide",
  82. "Glass_4_hide",
  83. "Glass_5_hide",
  84. "Glass_6_hide",
  85. "Glass_7_hide",
  86. "Glass_8_hide"
  87. };
  88. sectionsInherit = "";
  89. class Animations
  90. {
  91. // Animation for rotating door #1 (without a door handle)
  92. class Door_1_rot
  93. {
  94. type = rotation;
  95. source = Door_1_source; // Controler defined in class AnimationSources in config.cpp.
  96. selection = Door_1; // Selection from p3d that also has to be defined as a bone in this model`s skeleton.
  97. axis = Door_1_axis; // Axis of the rotation.
  98. memory = 1;
  99. minValue = 0; // Value of the controller at which the rotation will be angle0
  100. maxValue = 1; // Value of the controller at which the rotation will be angle1
  101. angle0 = 0;
  102. angle1 = (rad 90); // "rad" converts from degrees to radians
  103. };
  104.  
  105. // Animation for door #2 (with a door handle). Note that when door is being closed, the animations run in reverse.
  106. class Door_2_rot: Door_1_rot
  107. {
  108. source = Door_2_source;
  109. selection = Door_2;
  110. axis = Door_2_axis;
  111. minValue = 0.1; // Rotation of door starts at 0.1 instead of 0, because from 0 to 0.1 the handle is pressed down.
  112. angle1 = (rad 90);
  113. };
  114.  
  115. // Animation for door #3
  116. class Door_3_rot: Door_1_rot
  117. {
  118. source = Door_3_source;
  119. selection = Door_3;
  120. axis = Door_3_axis;
  121. minValue = 0.1;
  122. angle1 = (rad 90);
  123. };
  124.  
  125.  
  126. // Animation for door #4
  127. class Door_4_rot: Door_1_rot
  128. {
  129. source = Door_4_source;
  130. selection = Door_4;
  131. axis = Door_4_axis;
  132. minValue = 0.1;
  133. angle1 = (rad 95);
  134. };
  135.  
  136. // Animation for door #5
  137. class Door_5_rot: Door_1_rot
  138. {
  139. source = Door_5_source;
  140. selection = Door_5;
  141. axis = Door_5_axis;
  142. minValue = 0.1;
  143. angle1 = (rad 95);
  144. };
  145.  
  146. // Animation for door #6
  147. class Door_6_rot: Door_1_rot
  148. {
  149. source = Door_6_source;
  150. selection = Door_6;
  151. axis = Door_6_axis;
  152. minValue = 0.1;
  153. angle1 = (rad 95);
  154. };
  155.  
  156. // Animation for door #7
  157. class Door_7_rot: Door_1_rot
  158. {
  159. source = Door_7_source;
  160. selection = Door_7;
  161. axis = Door_7_axis;
  162. minValue = 0.1;
  163. angle1 = -(rad 95);
  164. };
  165.  
  166. class Door_8_rot: Door_1_rot
  167. {
  168. source = Door_8_source;
  169. selection = Door_8;
  170. axis = Door_8_axis;
  171. minValue = 0.1;
  172. angle1 = (rad 95);
  173. };
  174. };
  175. };
  176. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement