Hellstyrant

animations

Apr 27th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.66 KB | None | 0 0
  1. /*
  2. Author: Jiri Wainar
  3.  
  4. Description:
  5. Feeds params of given animset to BIS_fnc_ambientAnim.
  6. */
  7.  
  8. if (_this == "") exitWith {[]};
  9.  
  10. private["_azimutFix","_attachSnap","_attachOffset","_noBackpack","_noWeapon","_randomGear","_canInterpolate","_anims"];
  11.  
  12. //defaults
  13. _azimutFix = 0; //unit direction adjustment; some anims can be wrongly configured
  14. _attachSnap = 0.75;
  15. _attachOffset = 0;
  16. _noBackpack = false;
  17. _noWeapon = false;
  18. _randomGear = ["MEDIUM","MEDIUM","LIGHT"];
  19. _canInterpolate = false;
  20.  
  21. //setup ambient animations
  22. switch (_this) do
  23. {
  24. /*------------------------------------------------------------------------------------------
  25.  
  26. STANDING
  27.  
  28. ------------------------------------------------------------------------------------------*/
  29.  
  30. //generic standing with weapon
  31. case "STAND";
  32. case "STAND1":
  33. {
  34. _anims = ["HubStanding_idle1","HubStanding_idle2","HubStanding_idle3"];
  35. _canInterpolate = true;
  36. };
  37.  
  38. case "STAND_IA";
  39. case "STAND2":
  40. {
  41. _anims =
  42. [
  43. "amovpercmstpslowwrfldnon",
  44. "amovpercmstpslowwrfldnon",
  45. "aidlpercmstpslowwrfldnon_g01",
  46. "aidlpercmstpslowwrfldnon_g02",
  47. "aidlpercmstpslowwrfldnon_g03",
  48. "aidlpercmstpslowwrfldnon_g05"
  49. ];
  50. _canInterpolate = true;
  51. };
  52.  
  53. //generic standing without weapon
  54. case "STAND_U1":
  55. {
  56. _anims = ["HubStandingUA_idle1","HubStandingUA_idle2","HubStandingUA_idle3","HubStandingUA_move1","HubStandingUA_move2"];
  57. _noWeapon = true;
  58. };
  59. case "STAND_U2":
  60. {
  61. _anims = ["HubStandingUB_idle1","HubStandingUB_idle2","HubStandingUB_idle3","HubStandingUB_move1"];
  62. _noWeapon = true;
  63. _randomGear = ["MEDIUM","MEDIUM","FULL"];
  64. };
  65. case "STAND_U3":
  66. {
  67. _anims = ["HubStandingUC_idle1","HubStandingUC_idle2","HubStandingUC_idle3","HubStandingUC_move1","HubStandingUC_move2"];
  68. _noWeapon = true;
  69. };
  70.  
  71.  
  72. //on watch, turning and looking around
  73. case "WATCH";
  74. case "WATCH1":
  75. {
  76. _anims = ["inbasemoves_patrolling1"];
  77. _randomGear = ["MEDIUM","FULL","FULL"];
  78. _canInterpolate = true;
  79. };
  80. case "WATCH2":
  81. {
  82. _anims = ["inbasemoves_patrolling2"];
  83. _randomGear = ["MEDIUM","FULL","FULL"];
  84. _canInterpolate = true;
  85. };
  86.  
  87. //on guard, hands behind back
  88. case "GUARD":
  89. {
  90. _anims = ["inbasemoves_handsbehindback1","inbasemoves_handsbehindback2"];
  91. _randomGear = ["MEDIUM","MEDIUM","FULL"];
  92. _noBackpack = true;
  93. _noWeapon = true;
  94. };
  95.  
  96. //hands behind back
  97. case "LISTEN_BRIEFING":
  98. {
  99. _anims = ["unaercposlechvelitele1","unaercposlechvelitele2","unaercposlechvelitele3","unaercposlechvelitele4"];
  100. _noWeapon = true;
  101. _noBackpack = true;
  102. };
  103.  
  104. //leaning
  105. case "LEAN_ON_TABLE":
  106. {
  107. _anims = ["inbasemoves_table1"];
  108. _attachOffset = -0.8;
  109. _attachSnap = 2;
  110. _noWeapon = true;
  111. _noBackpack = true;
  112. _randomGear = ["NONE","NONE","NONE","LIGHT","LIGHT","MEDIUM"];
  113. };
  114. case "LEAN":
  115. {
  116. _azimutFix = -45;
  117. _anims = ["inbasemoves_lean1"];
  118. _attachSnap = 2;
  119. _noBackpack = true;
  120. };
  121.  
  122. /*------------------------------------------------------------------------------------------
  123.  
  124. SITTING
  125.  
  126. ------------------------------------------------------------------------------------------*/
  127.  
  128. //sitting @ table
  129. case "SIT_AT_TABLE":
  130. {
  131. _anims = ["HubSittingAtTableU_idle1","HubSittingAtTableU_idle2","HubSittingAtTableU_idle3"];
  132. _attachOffset = -0.5;
  133. _attachSnap = 2;
  134. _noBackpack = true;
  135. _noWeapon = true;
  136. };
  137.  
  138. //sitting with weapon
  139. // -"- ... rifle between legs
  140. case "SIT1":
  141. {
  142. _anims = ["HubSittingChairA_idle1","HubSittingChairA_idle2","HubSittingChairA_idle3","HubSittingChairA_move1"];
  143. _attachOffset = -0.5;
  144. _attachSnap = 2;
  145. _noBackpack = true;
  146. };
  147. // -"- ... rifle rested on legs
  148. case "SIT";
  149. case "SIT2":
  150. {
  151. _anims = ["HubSittingChairB_idle1","HubSittingChairB_idle2","HubSittingChairB_idle3","HubSittingChairB_move1"];
  152. _attachOffset = -0.5;
  153. _attachSnap = 2;
  154. _noBackpack = true;
  155. };
  156. // -"- ... relaxed
  157. case "SIT3":
  158. {
  159. _anims = ["HubSittingChairC_idle1","HubSittingChairC_idle2","HubSittingChairC_idle3","HubSittingChairC_move1"];
  160. _attachOffset = -0.5;
  161. _attachSnap = 2;
  162. _noBackpack = true;
  163. };
  164.  
  165. //sitting without weapon
  166. case "SIT_U1":
  167. {
  168. _anims = ["HubSittingChairUA_idle1","HubSittingChairUA_idle2","HubSittingChairUA_idle3","HubSittingChairUA_move1"];
  169. _attachOffset = -0.5;
  170. _attachSnap = 2;
  171. _noBackpack = true;
  172. _noWeapon = true;
  173. };
  174. case "SIT_U2":
  175. {
  176. _anims = ["HubSittingChairUB_idle1","HubSittingChairUB_idle2","HubSittingChairUB_idle3","HubSittingChairUB_move1"];
  177. _attachOffset = -0.5;
  178. _attachSnap = 2;
  179. _noBackpack = true;
  180. _noWeapon = true;
  181. };
  182. case "SIT_U3":
  183. {
  184. _anims = ["HubSittingChairUC_idle1","HubSittingChairUC_idle2","HubSittingChairUC_idle3","HubSittingChairUC_move1"];
  185. _attachOffset = -0.5;
  186. _attachSnap = 2;
  187. _noBackpack = true;
  188. _noWeapon = true;
  189. };
  190.  
  191. //todo: fix params
  192. //sitting on high object like h-barrier or wall
  193. case "SIT_HIGH1":
  194. {
  195. _anims = ["HubSittingHighA_idle1"];
  196. _attachOffset = -0.60;
  197. _attachSnap = 2;
  198. _azimutFix = 140;
  199. };
  200. case "SIT_HIGH";
  201. case "SIT_HIGH2":
  202. {
  203. _anims = ["HubSittingHighB_move1"/*,"HubSittingHighB_idle1","HubSittingHighB_idle2","HubSittingHighB_idle3"*/];
  204. _attachOffset = -0.9;
  205. _attachSnap = 1.5;
  206. _azimutFix = -20;
  207. };
  208.  
  209. //sitting on ground with weapon
  210. case "SIT_LOW":
  211. {
  212. _anims = ["amovpsitmstpslowwrfldnon","amovpsitmstpslowwrfldnon_smoking","amovpsitmstpslowwrfldnon_weaponcheck1","amovpsitmstpslowwrfldnon_weaponcheck2"];
  213. _canInterpolate = true;
  214. };
  215.  
  216. //sitting on ground without weapon
  217. case "SIT_LOW_U":
  218. {
  219. _anims = ["aidlpsitmstpsnonwnondnon_ground00","amovpsitmstpsnonwnondnon_ground"];
  220. _noWeapon = true;
  221. _noBackpack = true;
  222. };
  223.  
  224. //sitting, looking sad and nervous
  225. case "SIT_SAD1":
  226. {
  227. _anims = ["c5efe_michalloop"];
  228. _attachOffset = -0.5;
  229. _attachSnap = 2;
  230. };
  231. case "SIT_SAD2":
  232. {
  233. _anims = ["c5efe_honzaloop"];
  234. _attachOffset = -0.5;
  235. _attachSnap = 2;
  236. };
  237.  
  238. /*------------------------------------------------------------------------------------------
  239.  
  240. KNEEL
  241.  
  242. ------------------------------------------------------------------------------------------*/
  243.  
  244. case "KNEEL":
  245. {
  246. _anims = ["amovpknlmstpslowwrfldnon","aidlpknlmstpslowwrfldnon_ai","aidlpknlmstpslowwrfldnon_g01","aidlpknlmstpslowwrfldnon_g02","aidlpknlmstpslowwrfldnon_g03","aidlpknlmstpslowwrfldnon_g0s"];
  247. _canInterpolate = true;
  248. };
  249.  
  250. /*------------------------------------------------------------------------------------------
  251.  
  252. FIXING VEHICLE
  253.  
  254. ------------------------------------------------------------------------------------------*/
  255.  
  256. //repairing vehicle
  257. case "REPAIR_VEH_PRONE":
  258. {
  259. _anims = ["hubfixingvehicleprone_idle1"];
  260. _azimutFix = 180;
  261. _attachSnap = 2;
  262. _noBackpack = true;
  263. _noWeapon = true;
  264. _randomGear = ["NONE"];
  265. };
  266. case "REPAIR_VEH_KNEEL":
  267. {
  268. _anims = ["inbasemoves_repairvehicleknl"];
  269. _attachSnap = 2;
  270. _noWeapon = true;
  271. _noBackpack = true;
  272. _randomGear = ["NONE","LIGHT"];
  273. };
  274. case "REPAIR_VEH_STAND":
  275. {
  276. _anims = ["inbasemoves_assemblingvehicleerc"];
  277. _attachSnap = 2;
  278. _noWeapon = true;
  279. _noBackpack = true;
  280. _randomGear = ["NONE","LIGHT"];
  281. };
  282.  
  283. /*------------------------------------------------------------------------------------------
  284.  
  285. WOUNDED
  286.  
  287. ------------------------------------------------------------------------------------------*/
  288.  
  289. //prone, wounded, unarmed
  290. case "PRONE_INJURED_U1":
  291. {
  292. _anims = ["ainjppnemstpsnonwnondnon"];
  293. _azimutFix = 180;
  294. _noWeapon = true;
  295. _noBackpack = true;
  296. _randomGear = ["MEDIUM"];
  297. };
  298. case "PRONE_INJURED_U2":
  299. {
  300. _anims = ["hubwoundedprone_idle1","hubwoundedprone_idle2"];
  301. _noWeapon = true;
  302. _noBackpack = true;
  303. _randomGear = ["MEDIUM"];
  304. };
  305.  
  306. //prone, wounded, weapon lying on ground
  307. case "PRONE_INJURED":
  308. {
  309. _anims = ["acts_injuredangryrifle01","acts_injuredcoughrifle02","acts_injuredlookingrifle01","acts_injuredlookingrifle02","acts_injuredlookingrifle03","acts_injuredlookingrifle04","acts_injuredlookingrifle05","acts_injuredlyingrifle01"];
  310. _noBackpack = true;
  311. _randomGear = ["MEDIUM"];
  312. };
  313.  
  314. //kneeling, treating wounded soldier lying on ground
  315. case "KNEEL_TREAT":
  316. {
  317. _anims = ["ainvpknlmstpsnonwnondnon_medic","ainvpknlmstpsnonwnondnon_medic0","ainvpknlmstpsnonwnondnon_medic1","ainvpknlmstpsnonwnondnon_medic2","ainvpknlmstpsnonwnondnon_medic3","ainvpknlmstpsnonwnondnon_medic4","ainvpknlmstpsnonwnondnon_medic5"];
  318. _noWeapon = true;
  319. _randomGear = ["MEDIUM"];
  320. };
  321.  
  322. case "KNEEL_TREAT2":
  323. {
  324. _anims = ["acts_treatingwounded01","acts_treatingwounded02","acts_treatingwounded03","acts_treatingwounded04","acts_treatingwounded05","acts_treatingwounded06"];
  325. _noWeapon = true;
  326. _randomGear = ["MEDIUM"];
  327. };
  328.  
  329. /*------------------------------------------------------------------------------------------
  330.  
  331. BRIEFING
  332.  
  333. ------------------------------------------------------------------------------------------*/
  334.  
  335. //generic ambient briefing loop with occasional random moves
  336. case "BRIEFING":
  337. {
  338. _anims = ["hubbriefing_loop","hubbriefing_loop","hubbriefing_loop","hubbriefing_lookaround1","hubbriefing_lookaround2","hubbriefing_scratch","hubbriefing_stretch","hubbriefing_talkaround"];
  339. _noWeapon = true;
  340. _noBackpack = true;
  341. _randomGear = ["NONE","NONE","NONE","LIGHT","LIGHT","MEDIUM"];
  342. };
  343. case "BRIEFING_POINT_LEFT":
  344. {
  345. _anims = ["hubbriefing_loop","hubbriefing_loop","hubbriefing_loop","hubbriefing_lookaround1","hubbriefing_lookaround2","hubbriefing_pointleft","hubbriefing_scratch","hubbriefing_stretch","hubbriefing_talkaround"];
  346. _noWeapon = true;
  347. _noBackpack = true;
  348. _randomGear = ["NONE","NONE","NONE","LIGHT","LIGHT","MEDIUM"];
  349. };
  350. case "BRIEFING_POINT_RIGHT":
  351. {
  352. _anims = ["hubbriefing_loop","hubbriefing_loop","hubbriefing_loop","hubbriefing_lookaround1","hubbriefing_lookaround2","hubbriefing_pointright","hubbriefing_scratch","hubbriefing_stretch","hubbriefing_talkaround"];
  353. _noWeapon = true;
  354. _noBackpack = true;
  355. _randomGear = ["NONE","NONE","NONE","LIGHT","LIGHT","MEDIUM"];
  356. };
  357. case "BRIEFING_POINT_TABLE":
  358. {
  359. _anims = ["hubbriefing_loop","hubbriefing_loop","hubbriefing_loop","hubbriefing_lookaround1","hubbriefing_lookaround2","hubbriefing_pointattable","hubbriefing_scratch","hubbriefing_stretch","hubbriefing_talkaround"];
  360. _noWeapon = true;
  361. _noBackpack = true;
  362. _randomGear = ["NONE","NONE","NONE","LIGHT","LIGHT","MEDIUM"];
  363. };
  364.  
  365. default
  366. {
  367. ["Animation set not recognized!",_unit,_animset] call BIS_fnc_error;
  368.  
  369. _anims = [];
  370. };
  371. };
  372.  
  373. //convert all anims to lowercase
  374. {
  375. _anims set [_forEachIndex,toLower _x];
  376. }
  377. forEach _anims;
  378.  
  379. [_anims,_azimutFix,_attachSnap,_attachOffset,_noBackpack,_noWeapon,_randomGear,_canInterpolate]
Advertisement
Add Comment
Please, Sign In to add comment