Advertisement
Faguss

UNIT_PUT_SATCHEL_VEHICLE

Aug 8th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.30 KB | None | 0 0
  1. if (Format ["%1",FUNCTION_ASSIGN_ID] == "scalar bool array string 0xfcffffef") then
  2. {
  3. UNITS_LIST = [];
  4. UNIT_ANIMATION_LIST = [];
  5. UNIT_PUT_SATCHEL_VEHICLE = [];
  6.  
  7. FUNCTION_ASSIGN_ID =
  8. {
  9. if (!(_this in UNITS_LIST)) then
  10. {
  11. UNITS_LIST set [count UNITS_LIST, _this];
  12. UNIT_ANIMATION_LIST set [count UNIT_ANIMATION_LIST, "combat"];
  13. UNIT_PUT_SATCHEL_VEHICLE set [count UNIT_PUT_SATCHEL_VEHICLE, false];
  14. }
  15. };
  16.  
  17. FUNCTION_SETANIM =
  18. {
  19. private ["_id"];
  20. _id = UNITS_LIST find (_this select 0);
  21. if (_id >= 0) then {UNIT_ANIMATION_LIST set [_id, _this select 1]};
  22. };
  23.  
  24. FUNCTION_GETANIM =
  25. {
  26. private ["_id"];
  27. _id = UNITS_LIST find (_this select 0);
  28. if (_id >= 0) then {UNIT_ANIMATION_LIST select _id} else {""}
  29. };
  30.  
  31. FUNCTION_ANIMCHANGED =
  32. {
  33. private ["_id","_anim"];
  34. _id = UNITS_LIST find (_this select 0);
  35.  
  36. if (_id >= 0) then {
  37. _anim = UNIT_ANIMATION_LIST select _id;
  38.  
  39. if (_anim in [{weapon0},{weaponcrouching0},{weaponlying0},{swiminglauncher0},{weaponputdown0},{putdownweaponcrouching0},{putdownweaponlying0},{weaponwalkf0}])
  40. then {
  41. (_this select 0) selectWeapon (secondaryWeapon (_this select 0))
  42. };
  43.  
  44. if ((!canStand (_this select 0)) and (_anim in [{weapon},{weaponcrouching}]))
  45. then {
  46. (_this select 0) switchMove {WeaponLying}
  47. };
  48.  
  49. UNIT_PUT_SATCHEL_VEHICLE set [_id, (_anim in [{combatreloadput},{crouchreloadput},{lyingreloadput},{handgunstandreloadput},{handguncrouchreloadput},{handgunlyingreloadput},{civilreloadput},{civillyingreloadput},{swimingreloadput},{swimingnoweaponreloadput},{swiminghandgunreloadput}])];
  50. };
  51. };
  52.  
  53. FUNCTION_HIT =
  54. {
  55. private "_anim";
  56. _anim = _this call FUNCTION_GETANIM;
  57.  
  58. if (_anim in [{combat},{combatrelaxed},{combatstillv1},{combatstillplayer},{combatrelaxedstill},{combatrelaxednew1},{combatrelaxednew2},{combatrelaxednew3},{combatrelaxednew4},{combatrelaxednew5},{combatrelaxednew6},{combatstandingreloadmagazine},{binoc},{combattotakeflag},{putdown},{medic},{treated},{combatreloadmortarstart},{combatthrowgrenadestart},{combatrunthrowgrenadestart},{combatstrokegun},{combatrunf},{combatrunlf},{combatrunrf},{combatrunl},{combatrunr},{combatrunlb},{combatrunrb},{combatrunb},{aimcombatrunf},{aimcombatrunlf},{aimcombatrunrf},{aimcombatrunl},{aimcombatrunr},{aimcombatrunlb},{aimcombatrunrb},{aimcombatrunb},{combatsprintf},{aimcombatsprintf},{combatsprintlf},{aimcombatsprintlf},{combatsprintrf},{aimcombatsprintrf},{combatturnr},{combatturnl},{combatturnrrelaxed},{combatturnlrelaxed},{combatwalkf},{combatwalklf},{combatwalkrf},{combatwalkl},{combatwalkr},{combatwalklb},{combatwalkrb},{combatwalkb},{weapontocombat},{combatgetincar},{combatgetintank},{ww4leanleft},{ww4leanright},{blindfire},{combatstandingreloadmagazine},{combatrunreloadmagazine},{combatwalkreloadmagazine},{combatreloadput}])
  59. then {
  60. (_this select 0) switchMove {CombatHit}
  61. };
  62.  
  63.  
  64. if (_anim in [{crouch},{crouchim},{crouchreloadmagazine},{crouchrunf},{aimcrouchrunf},{crouchrunlf},{aimcrouchrunlf},{crouchrunrf},{aimcrouchrunrf},{crouchrunl},{aimcrouchrunl},{crouchrunr},{aimcrouchrunr},{crouchrunlb},{crouchrunrb},{crouchrunb},{crouchwalkf},{crouchwalklf},{crouchwalkrf},{crouchwalkl},{crouchwalkr},{crouchwalklb},{crouchwalkrb},{crouchwalkb},{crouchsprintf},{aimcrouchsprintf},{crouchsprintlf},{aimcrouchsprintlf},{crouchsprintrf},{aimcrouchsprintrf},{crouchturnr},{crouchturnl},{binoccrouch},{crouchthrowgrenadestart},{crouchtotakeflag},{putdowncrouch},{ww4crleanleft},{ww4crleanright},{weaponcrouchingtocrouch},{crouch_cotoul},{crouchrunreloadmagazine},{blindfirecrouch},{crouch_cotoul_right},{crouchreloadput}])
  65. then {
  66. (_this select 0) switchMove {CrouchHit}
  67. };
  68.  
  69.  
  70. if (_anim in [{binoclying},{putdownlying},{treatedlying},{lying},{lyingstillv1},{lyingturnl},{lyingturnr},{lyingreloadmagazine},{lyingthrowgrenadestart},{lyingcrawlf},{lyingfastcrawlf},{lyingcrawllf},{lyingcrawlrf},{lyingcrawll},{lyingcrawlr},{lyingcrawllb},{lyingcrawlrb},{lyingcrawlb},{ww4_rollright},{ww4_rollleft},{ww4lyingup},{lyingtotakeflag},{lyingreloadput}])
  71. then {
  72. (_this select 0) switchMove {LyingToTreatedLyingHit}
  73. };
  74.  
  75.  
  76. if (_anim in [{handgunstand},{handgunstandvar2},{handgunstandreloadmagazine},{handgunstandthrowgrenade1},{handgunstandwalkf},{handgunstandwalklf},{handgunstandwalkrf},{handgunstandwalkl},{handgunstandwalkr},{handgunstandwalkb},{handgunstandwalklb},{handgunstandwalkrb},{handgunstandrunf},{handgunstandrunlf},{handgunstandrunrf},{handgunstandrunl},{handgunstandrunr},{handgunstandrunb},{handgunstandrunlb},{handgunstandrunrb},{handgunstandturnl},{handgunstandturnr},{handgunstandrelaxed},{handgunstandrelaxedstill},{handgunstandturnlrelaxed},{handgunstandturnrrelaxed},{binochandgunstand},{civiltohandgunstand1},{handgunmedic},{handgunputdown},{handgunstandtohandguntakeflag},{handguntreated},{ww4pstandleanleft},{ww4pstandleanright},{handgunstandjogf},{handgunstandjoglf},{handgunstandjogrf},{handgunstandjogl},{handgunstandjogr},{handgunstandjogrb},{handgunstandjoglb},{handgunstandjogb},{apcrouchrunf},{apcrouchrunlf},{apcrouchrunrf},{apcrouchrunl},{apcrouchrunr},{pistolrunthrowgrenadestart},{blindfirehandgunstand},{handgunstandreloadput}])
  77. then {
  78. (_this select 0) switchMove {HandGunStandHit}
  79. };
  80.  
  81.  
  82. if (_anim in [{handguncrouchwalkf},{handguncrouchwalklf},{handguncrouchwalkrf},{handguncrouchwalkl},{handguncrouchwalkr},{handguncrouchwalkb},{handguncrouchwalklb},{handguncrouchwalkrb},{handguncrouchrunf},{handguncrouchrunlf},{handguncrouchrunrf},{handguncrouchrunl},{handguncrouchrunr},{handguncrouchrunb},{handguncrouchrunlb},{handguncrouchrunrb},{handguncrouchputdown},{ww4pcrouchleanleft},{ww4pcrouchleanright},{blindfirehandguncrouch},{handguncrouchthrowgrenadestart},{handguncrouch_cotoul},{handguncrouch_cotoul_right},{handguncrouchtotakeflag},{handguncrouchreloadput}])
  83. then {
  84. (_this select 0) switchMove {HandGunCrouchHit}
  85. };
  86.  
  87.  
  88. if (_anim in [{handgunlying},{handgunlyingvar2},{handgunlyingreloadmagazine},{handgunlyingthrowgrenade1},{handgunlyingcrawlf},{handgunlyingfastcrawlf},{handgunlyingcrawllf},{handgunlyingcrawlrf},{handgunlyingcrawll},{handgunlyingcrawlr},{handgunlyingcrawlb},{handgunlyingcrawllb},{handgunlyingcrawlrb},{handgunlyingturnl},{handgunlyingturnr},{binochandgunlying},{handgunlyingputdown},{handgunlyingtreated},{ww4ppronerollright},{ww4ppronerollleft},{ww4handgunlyingup},{handgunlyingtotakeflag},{handgunlyingreloadput}])
  89. then {
  90. (_this select 0) switchMove {HandGunLyingToHandGunLyingTreatedHit}
  91. };
  92.  
  93.  
  94. if (_anim in [{combattoweapon},{weapon},{weaponwalkf},{weaponwalkl},{weaponwalkr},{weaponwalkb},{weaponwalklf},{weaponwalkrf},{weaponwalklb},{weaponwalkrb},{weaponturnl},{slowweaponwalkf},{slowweaponwalkl},{slowweaponwalkr},{slowweaponwalkb},{slowweaponwalklf},{slowweaponwalkrf},{slowweaponwalklb},{slowweaponwalkrb},{weaponturnr},{weaponreloadat},{weaponrunf},{weaponrunrf},{weaponrunlf},{atbinoc},{atbinoctoweapon},{weaponlyingtoweapon},{weaponcrouchingtoweapon},{weapon0},{ww4weaponleanleft},{ww4weaponleanright},{weaponputdown},{weapongetincar},{weapongetintank},{treatedweapon},{medicweapon},{weapontotakeflag}])
  95. then {
  96. (_this select 0) switchMove {WeaponHit}
  97. };
  98. };
  99.  
  100. FUNCTION_GETPUTSATCHELVEHICLE =
  101. {
  102. private ["_id"];
  103. _id = UNITS_LIST find (_this select 0);
  104. if (_id >= 0) then {UNIT_PUT_SATCHEL_VEHICLE select _id} else {false}
  105. };
  106. };
  107.  
  108. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement