Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.00 KB | None | 0 0
  1. class CfgSkeletons
  2. {
  3. class SWANO_Weapon_anim
  4. {
  5. pivotsModel="";
  6. isDiscrete = 0;
  7. skeletonInherit = "";
  8. skeletonBones[] =
  9. {
  10. "trigger", "", /// not in this model, but good to use
  11. "bolt", "",
  12. "bolt_catch", "",
  13. "magazine", "",
  14. "safety", "",
  15. "muzzleFlash", "",
  16. "OP", "",
  17. "ForeSight", "",
  18. "BackSight", ""
  19. };
  20. };
  21. };
  22. class CfgModels
  23. {
  24. class Default;
  25. class Optic: Default
  26. {
  27. sections[]=
  28. {
  29. "zasleh"
  30. };
  31. };
  32. class Weapon: Default
  33. {
  34. sections[]=
  35. {
  36. "zasleh"
  37. };
  38.  
  39. htMin = 1; // Minimum half-cooling time (in seconds)
  40. htMax = 600; // Maximum half-cooling time (in seconds)
  41. afMax = 0; // Maximum temperature in case the model is alive (in celsius)
  42. mfMax = 0; // Maximum temperature when the model is moving (in celsius)
  43. mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
  44. tBody = 100; // Metabolism temperature of the model (in celsius)
  45.  
  46. skeletonName="Weapon";
  47. class Animations
  48. {
  49. class zaslehROT
  50. {
  51. type="rotation";
  52. source="clockMinute";
  53. sourceAddress="loop";
  54. selection="zasleh";
  55. begin="usti hlavne";
  56. end="konec hlavne";
  57. memory=1;
  58. minValue=0.0166665;
  59. maxValue=0.016666666666666666666666666666667;
  60. angle0="rad 0";
  61. angle1="rad 360";
  62. };
  63. class magazine_hide
  64. {
  65. type="hide";
  66. source="reloadMagazine";
  67. sourceAddress="mirror";
  68. selection="magazine";
  69. minValue=0.0;
  70. maxValue=0.4;
  71. hideValue=0.5;
  72. };
  73. class reload_ammobelt_hide: magazine_hide
  74. {
  75. selection="ammo_belt";
  76. };
  77. class reload_ammobelt_bottom_hide: magazine_hide
  78. {
  79. selection="ammo_belt_bottom";
  80. };
  81. class ammobelt_hide: magazine_hide
  82. {
  83. source="isEmpty";
  84. selection="ammo_belt";
  85. minValue=0.000000;
  86. maxValue=1.000000;
  87. hideValue=1.000000;
  88. };
  89. class ammobelt_bottom_hide: ammobelt_hide
  90. {
  91. selection="ammo_belt_bottom";
  92. };
  93. /// Hiding of magazine if weapon has none
  94. class no_magazine
  95. {
  96. type="hide";
  97. source="hasMagazine";
  98. selection="magazine";
  99. minValue=0.000000;
  100. maxValue=1.00000;
  101. hideValue=0.5;
  102. unhideValue = -1.0;
  103. };
  104. };
  105. };
  106. class Rifle: Weapon
  107. {
  108. skeletonName="Rifle";
  109. class Animations: Animations
  110. {
  111. class magazine_hide:magazine_hide
  112. {
  113. sourceAddress="mirror";
  114. minValue=0.0;
  115. maxValue=0.56;
  116. hideValue=0.36;
  117. };
  118. class bolt_empty
  119. {
  120. type="translation";
  121. source="isEmpty";
  122. selection="bolt";
  123. axis="bolt_axis";
  124. memory=1;
  125. minValue=0.000000;
  126. maxValue=0.500000;
  127. offset0=0;
  128. offset1=0.5;
  129. };
  130. class bullet_cover
  131. {
  132. type="rotation";
  133. source="reload";
  134. sourceAddress="mirror";
  135. selection="bullet_cover";
  136. axis="bullet_cover_axis";
  137. memory=1;
  138. minValue=0.0;
  139. maxValue=0.5;
  140. angle0=0;
  141. angle1=-0.4;
  142. };
  143. class bolt_fire_begin
  144. {
  145. type="translation";
  146. source="reload";
  147. selection="bolt";
  148. axis="bolt_axis";
  149. memory=1;
  150. minValue=0.000000;
  151. maxValue=0.300000;
  152. offset0=0;
  153. offset1=0.5;
  154. };
  155. class bolt_fire_end:bolt_fire_begin
  156. {
  157. minValue=0.500000;
  158. maxValue=1.000000;
  159. offset0=0;
  160. offset1=-0.5;
  161. };
  162. class bolt_reload_begin
  163. {
  164. type="translation";
  165. source="reloadMagazine";
  166. selection="bolt";
  167. axis="bolt_axis";
  168. memory=1;
  169. minValue=0.1;
  170. maxValue=0.15;
  171. offset0=0;
  172. offset1=0.5;
  173. };
  174. class bolt_reload_end:bolt_reload_begin
  175. {
  176. minValue=0.980000;
  177. maxValue=1.000000;
  178. offset0=0;
  179. offset1=-0.5;
  180. };
  181. };
  182. };
  183. class SWANO_WeaponBase: Rifle
  184. {
  185. skeletonName = "SWANO_Weapon_anim";
  186. sectionsInherit = "";
  187. sections[] = {"muzzleFlash","Camo"};
  188. class Animations
  189. {
  190. class trigger /// not in this model, but good to use
  191. {
  192. type = "rotation";
  193. source = "reload";
  194. sourceAddress = "clamp";
  195. selection = "trigger";
  196. axis = "trigger_axis";
  197. minValue = 0;
  198. maxValue = "1";
  199. angle0 = "0";
  200. angle1 = "rad -30";
  201. };
  202.  
  203. class bolt
  204. {
  205. type = "translation";
  206. source = "reload";
  207. sourceAddress = clamp;
  208. selection = "bolt";
  209. axis = "bolt_axis";
  210. minValue = 0.5;
  211. maxValue = 1;
  212. offset0 = 0;
  213. offset1 = 0.3;
  214. };
  215. class bolt_2: bolt
  216. {
  217. minValue = 0;
  218. maxValue = 0.5;
  219. offset0 = 0;
  220. offset1 = 0.7;
  221. };
  222. class bolt_empty: bolt{
  223. source = "isEmptyNoReload";
  224. minValue = 0;
  225. maxValue = 1;
  226. offset0 = 0;
  227. offset1 = 1;
  228. };
  229. class bolt_reload_move_1: bolt_empty {
  230. source="reloadMagazine"; // z: should work like that only if weapon is empty
  231. minValue=0;
  232. maxValue=0.00001;
  233. };
  234. class bolt_reload_move_2: bolt_reload_move_1 {
  235. source="reloadMagazine"; // z: should work like that only if weapon is empty
  236. minValue=0.78;
  237. maxValue=0.80;
  238. offset1 = -1;
  239. };
  240. class bolt_catch: bolt {
  241. selection = "bolt_catch";
  242. axis = "bolt_catch_axis";
  243. };
  244. class bolt_catch_2: bolt_2 {
  245. selection = "bolt_catch";
  246. axis = "bolt_catch_axis";
  247. };
  248. class bolt_catch_empty: bolt_empty {
  249. selection = "bolt_catch";
  250. axis = "bolt_catch_axis";
  251. };
  252. class bolt_catch_reload_move_1: bolt_reload_move_1 {
  253. selection = "bolt_catch";
  254. axis = "bolt_catch_axis";
  255. };
  256. class bolt_catch_reload_move_2: bolt_reload_move_2 {
  257. selection = "bolt_catch";
  258. axis = "bolt_catch_axis";
  259. };
  260. class magazine_hide
  261. {
  262. type="hide";
  263. source="reloadMagazine";
  264. selection="magazine";
  265. minValue=0.000000;
  266. maxValue=1.00000;
  267. hideValue=0.188;
  268. unhideValue = 0.550;
  269. };
  270. class no_magazine
  271. {
  272. type="hide";
  273. source="hasMagazine";
  274. selection="magazine";
  275. minValue=0.000000;
  276. maxValue=1.00000;
  277. hideValue=0.5;
  278. unhideValue = -1.0;
  279. };
  280. class magazine_reload_move_1
  281. {
  282. type = "translation";
  283. source = "reloadMagazine";
  284. selection = "magazine";
  285. axis = "magazine_axis";
  286. minValue = 0.145;
  287. maxValue = 0.170;
  288. offset0 = 0.0;
  289. offset1 = 0.5;
  290. };
  291. class magazine_reload_move_2: magazine_reload_move_1
  292. {
  293. minValue = 0.573;
  294. maxValue = 0.602;
  295. offset0 = 0.0;
  296. offset1 = -0.5;
  297. };
  298.  
  299. class muzzleFlashROT
  300. {
  301. type="rotationX";
  302. source="ammoRandom"; //use ammo count as phase for animation
  303. sourceAddress="loop"; //loop when phase out of bounds
  304. selection="muzzleFlash"; //selection we want to rotate
  305. axis=""; //no own axis - center of rotation is computed from selection
  306. centerFirstVertex=true; //use first vertex of selection as center of rotation
  307. minValue=0;
  308. maxValue=4; //rotation angle will be 360/4 = 90 degrees
  309. angle0="rad 0";
  310. angle1="rad 360";
  311. };
  312. class OP_ROT
  313. {
  314. type="rotation";
  315. source="zeroing2"; // use second muzzle zeroing for rotation
  316. sourceAddress="loop"; // loop when phase out of bounds
  317. selection="OP"; // selection we want to rotate
  318. axis="OP_axis"; // has its own axis
  319. minValue=0;
  320. maxValue=3;
  321. angle0="rad 0";
  322. angle1="rad 65";
  323. };
  324. class BackSight_optic
  325. {
  326. type="rotation";
  327. source="hasOptics";
  328. selection="BackSight";
  329. axis="BackSight_axis";
  330. memory=1;
  331. minValue=0.0000000;
  332. maxValue=1.0000000;
  333. angle0=0.000000;
  334. angle1=(rad 90);
  335. };
  336. class ForeSight_optic: BackSight_optic
  337. {
  338. selection="ForeSight";
  339. axis="ForeSight_axis";
  340. angle1=(rad 90);
  341. };
  342.  
  343. // Rotation of fire mode switch
  344. class safety_mode_rot
  345. {
  346. type = rotation;
  347. source = weaponMode;
  348. selection = "safety";
  349. axis = "safety_axis";
  350. memory = 1;
  351. minValue = 0;
  352. maxValue = 0.25;
  353. angle0 = 0;
  354. angle1 = (rad -52);
  355. };
  356. };
  357. };
  358. class SWANO_ConceptRifle: SWANO_WeaponBase {};
  359.  
  360. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement