Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Format ["%1",FUNCTION_ASSIGN_ID] == "scalar bool array string 0xfcffffef") then
- {
- UNITS_LIST = [];
- UNIT_ANIMATION_LIST = [];
- UNIT_PUT_SATCHEL_VEHICLE = [];
- FUNCTION_ASSIGN_ID =
- {
- if (!(_this in UNITS_LIST)) then
- {
- UNITS_LIST set [count UNITS_LIST, _this];
- UNIT_ANIMATION_LIST set [count UNIT_ANIMATION_LIST, "combat"];
- UNIT_PUT_SATCHEL_VEHICLE set [count UNIT_PUT_SATCHEL_VEHICLE, false];
- }
- };
- FUNCTION_SETANIM =
- {
- private ["_id"];
- _id = UNITS_LIST find (_this select 0);
- if (_id >= 0) then {UNIT_ANIMATION_LIST set [_id, _this select 1]};
- };
- FUNCTION_GETANIM =
- {
- private ["_id"];
- _id = UNITS_LIST find (_this select 0);
- if (_id >= 0) then {UNIT_ANIMATION_LIST select _id} else {""}
- };
- FUNCTION_ANIMCHANGED =
- {
- private ["_id","_anim"];
- _id = UNITS_LIST find (_this select 0);
- if (_id >= 0) then {
- _anim = UNIT_ANIMATION_LIST select _id;
- if (_anim in [{weapon0},{weaponcrouching0},{weaponlying0},{swiminglauncher0},{weaponputdown0},{putdownweaponcrouching0},{putdownweaponlying0},{weaponwalkf0}])
- then {
- (_this select 0) selectWeapon (secondaryWeapon (_this select 0))
- };
- if ((!canStand (_this select 0)) and (_anim in [{weapon},{weaponcrouching}]))
- then {
- (_this select 0) switchMove {WeaponLying}
- };
- UNIT_PUT_SATCHEL_VEHICLE set [_id, (_anim in [{combatreloadput},{crouchreloadput},{lyingreloadput},{handgunstandreloadput},{handguncrouchreloadput},{handgunlyingreloadput},{civilreloadput},{civillyingreloadput},{swimingreloadput},{swimingnoweaponreloadput},{swiminghandgunreloadput}])];
- };
- };
- FUNCTION_HIT =
- {
- private "_anim";
- _anim = _this call FUNCTION_GETANIM;
- 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}])
- then {
- (_this select 0) switchMove {CombatHit}
- };
- 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}])
- then {
- (_this select 0) switchMove {CrouchHit}
- };
- 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}])
- then {
- (_this select 0) switchMove {LyingToTreatedLyingHit}
- };
- 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}])
- then {
- (_this select 0) switchMove {HandGunStandHit}
- };
- 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}])
- then {
- (_this select 0) switchMove {HandGunCrouchHit}
- };
- 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}])
- then {
- (_this select 0) switchMove {HandGunLyingToHandGunLyingTreatedHit}
- };
- 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}])
- then {
- (_this select 0) switchMove {WeaponHit}
- };
- };
- FUNCTION_GETPUTSATCHELVEHICLE =
- {
- private ["_id"];
- _id = UNITS_LIST find (_this select 0);
- if (_id >= 0) then {UNIT_PUT_SATCHEL_VEHICLE select _id} else {false}
- };
- };
- true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement