Jump to content

AdirB

Member
  • Content Count

    236
  • Joined

  • Last visited

  • Medals

Everything posted by AdirB

  1. AdirB

    RHS Escalation (AFRF and USAF)

    We're using the built in Bohemia function to set insignias. https://community.bistudio.com/wiki/BIS_fnc_setUnitInsignia However, we'll try using setObjectTextureGlobal. Thanks!
  2. AdirB

    RHS Escalation (AFRF and USAF)

    Hello! We are using custom insignias on our units and sometimes when we load the insignias they disappear from the shoulder and appear to change the shoes texture of the RHS uniforms. Do you know what can cause this and what can fix this? Thanks!
  3. Hello, we're trying to make multiplayer units get insignia programmatically by their UID. We have an array of UIDs and then we check if the player UID is in the array. _usPlayers = ["21312321312313"]; if((getPlayerUID player) in _usPlayers) then { [player, ""] call BIS_fnc_setUnitInsignia; [player, "us"] call BIS_fnc_setUnitInsignia; }; We first unassign and only then reassign the insignias because there's something weird with insignias where you can't assign the same insignia if it was already already assigned. We run this code in onPlayerRespawn.sqf. It works when first joining the server, however when respawning players can only see their own insignias. If a player goes back to the lobby and reloads the mission, he'll see the insignias of those who respawned. That tells me there's a JIP problem, and I hoped you'll be able to help me figure it out. Thanks!
  4. Hello, I'm trying to make a system that adds 1 kill point to a player. I do that because the ACE3 medical system messes with arma 3's score system. So what I try to do is run a loop which detects when a player has killed an east side unit and when he did, he will get 1 infantry kill point. Is there a way to do that?
  5. Hello, I'm trying to make a script that allows players to play animations, however, when one executes the script, everyone plays the animation. Right now, when one executes the script, everyone plays the animation. I'm using BIS_fnc_MP. I'm trying to make it so the animation plays only on the machine that executed the script, but visible for everyone else. How can I do this? Thanks!
  6. fnc_idle_animations = { private["_animation"]; _animation = _this select 0; player switchMove _animation; player addEventHandler ["AnimDone", { params[ "_unit", "_anim" ]; if (_anim == "c4coming2cDf_genericstani4") then { _unit switchMove "c4coming2cDf_genericstani4"; }; } ]; } _Idle_Anims_Action = ["Idle_Anims", "Idle Animations", "", {}, {}] call ace_interact_menu_fnc_createAction; ["Man", 1, ["ACE_SelfActions"], _Idle_Anims_Action, true] call ace_interact_menu_fnc_addActionToClass; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Idle_Stop_Condition = { animationState player == "c4coming2cDf_genericstani4" || animationState player == "HubStanding_idle1" || animationState player == "HubStanding_idle2" || animationState player == "HubStanding_idle3" || animationState player == "Acts_AidlPercMstpSloWWrflDnon_warmup_3_loop" || animationState player == "Acts_AidlPercMstpSlowWrflDnon_warmup03" || animationState player == "Acts_AidlPercMstpSlowWrflDnon_warmup04" }; _Idle_Stop_Statement = { ["","fnc_idle_animations"] call BIS_fnc_MP; }; _Idle_Stop_Action = ["Idle_Stop", "Stop Animation", "", _Idle_Stop_Statement, Idle_Stop_Condition] call ace_interact_menu_fnc_createAction; ["Man", 1, ["ACE_SelfActions", "Idle_Anims"], _Idle_Stop_Action, true] call ace_interact_menu_fnc_addActionToClass; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _condition = { animationState player == "amovpercmstpsraswrfldnon" || animationState player == "amovpercmstpslowwrfldnon" }; _Idle_1_Statement = { ["c4coming2cDf_genericstani4","fnc_idle_animations"] call BIS_fnc_MP; }; _Idle_1_Action = ["Idle_1", "Idle 1", "", _Idle_1_Statement, _condition] call ace_interact_menu_fnc_createAction; ["Man", 1, ["ACE_SelfActions", "Idle_Anims"], _Idle_1_Action, true] call ace_interact_menu_fnc_addActionToClass;
  7. Squad name: Task Force Wolfpack Timezone/location: GMT+2 / Israel Gamemode preference: Co-Op Contact email: taskforcewp@gmail.com Website address: Short description: Founded in 2017, Task Force Wolfpack is an Israeli casual-milsim group. We operate as a special operations unit based after the United States Special Operations Command (USSOCOM). In order to execute special tactics and strategies during missions, Task Force Wolfpack implements its own doctrine, based on various real-life doctrines and adapted to limitations of ArmA III's engine. Language: Hebrew, English
  8. _dog = createAgent ["Fin_random_F", getPos player, [], 5, "CAN_COLLIDE"]; _dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; dogStop = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Stop"; while {alive _dog && speed player = 0} do { _dog moveTo getPos player; sleep 0.5; }; }; dogWalk = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Walk"; while {alive _dog && speed player > 0} do { _dog moveTo getPos player; sleep 0.5; }; }; dogSprint = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Sprint"; while {alive _dog && speed player > 18} do { _dog moveTo getPos player; sleep 0.5; }; }; while {alive _dog && speed player = 0} do { _dog moveTo getPos player; sl> 5:48:55 Error position: <= 0} do { _dog moveTo getPos player; sl> 5:48:55 Error Missing ; 5:48:55 File C:\....\missions\Task Force Wolfpack\Mission Templates\Mission_Template_v1-0.Takistan\scripts\dog\dog.sqf, line 8 5:48:55 Error in expression <op"; Does anyone know what that means?
  9. AdirB

    Errors

    _dog = createAgent ["Fin_random_F", getPos player, [], 5, "CAN_COLLIDE"]; _dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; _dogSit = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Sit"; while {alive _dog && speed player == 0} do { _dog moveTo getPos player; hint "The dog is sitting"; sleep 0.5; }; }; _dogWalk = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Walk"; while {alive _dog && speed player > 0} do { _dog moveTo getPos player; hint "The dog is walking"; sleep 0.5; }; }; _dogSprint = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Sprint"; while {alive _dog && speed player >= 18} do { _dog moveTo getPos player; hint "The dog is sprinting"; sleep 0.5; }; }; That's what I got, but it won't work. Once I execute the script it will show "The dog is sitting", and it won't change it once I am speeding more than 0 or when I'm at 18 or speeding over it.
  10. AdirB

    Errors

    It doesn't work. What I'm trying to do is, make this: _dog = createAgent ["Fin_random_F", getPos player, [], 5, "CAN_COLLIDE"]; _dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; 0 = [_dog] spawn { params ["_dog"]; _dog playMove "Dog_Sprint"; while {alive _dog} do { _dog moveTo getPos player; sleep 0.5; }; }; Controllable by my speed, if I stop, the dog stops, if I walk, the dog walks, if I run, the dog runs.
  11. Hello, I made a re-texture for a scope and a weapon, and I'm trying to make the item compatible for the weapon. I found this https://community.bistudio.com/wiki/Arma_3_Weapon_Config_Guidelines#New_config_parameters_.7Bconfig.cpp.7D And I did this: class CfgPatches { class clans_weapons { units[] = {}; weapons[] = {"B"}; requiredVersion = 0.1; requiredAddons[] = {"tfwp_main"}; }; }; class SlotInfo; class CowsSlot : SlotInfo { linkProxy = "\A3\data_f\proxies\weapon_slots\TOP"; displayName = $STR_A3_CowsSlot0; compatibleItems[] = {"scope"}; }; class CfgWeapons { class A; class B : A { author = "AUTHORNAME"; scope = 2; weaponPoolAvailable = 1; displayName = "WEAPON"; hiddenSelections[] = {"camo1", "camo2", "camo3"}; hiddenSelectionsTextures[] = {".paa", ".paa", ".paa"}; class WeaponSlotsInfo { mass = 4; class CowsSlot: CowsSlot {}; allowedSlots[] = {901}; }; }; }; But I can't see the scope in the arsenal. I also heard that it is possible to do something with joint rails to make items compatible. What should I do?
  12. Thanks for your response! That's what I did: addMissionEventHandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (isPlayer _instigator AND side group _killed isEqualTo east) then { _instigator addPlayerScores [(getPlayerScores _instigator select 0)+1, getPlayerScores _instigator select 1, getPlayerScores _instigator select 2, getPlayerScores _instigator select 3, getPlayerScores _instigator select 4]; _instigator_kills = getPlayerScores _instigator; hint format["%1",_instigator_kills]; }; }]; But it didn't work at all, it didn't do anything. And then I found that instead of getting 1 point I'm getting a multiplied score. PE_PL addPlayerScores [(getPlayerScores PE_PL select 0)+1, getPlayerScores PE_PL select 1, getPlayerScores PE_PL select 2, getPlayerScores PE_PL select 3, getPlayerScores PE_PL select 4]; _pe_pl_kills = getPlayerScores PE_PL select 0; hint format["%1",_pe_pl_kills];
  13. AdirB

    WMO - Walkable Moving Objects

    Thanks for you work! This is one of the things I wish were built in the game. When I got inside the Hercules, The character wasn't able to stay still, so either the plane exploded and I died or the character clipped off the plane and crashed on the ground. Am I doing something wrong? It did work with a still chopper, I was able to walk inside, but the above is weird, because I saw you standing on top of the Blackfish in the video you made.
  14. A U.S Ranger And a Delta Force man in Mogadishu MODS: RHS, Mogadishu and US Military Mod MODS: RHS
  15. Hello, I am very very new in terrain building, I started two days ago percisely and sometimes I encounter with problems or things I don't know how to do. So, I need help with these: 1) I added a concerte layer to my terrain, in all works good except the fact that the grass is clipping through the concerte, what shall I do to fix it? 2) I noticed that my terrian has some concerte parts created by the L3DT, the terrian is randomly generated. I removed these additional and unnecessary concerte parts from the satellite mask in Photoshop but they obviously remained on the map texture, how can I edit it so it won't have these grey concerte parts and it will be similar to the mask layer? 3) How can I create a picturemap and a ui_map of my terrain? I'd apperciate any kind of help! :) Thanks in advance!
  16. They don't fly correctly. Going very very high, sometimes flying in circles, even if you use flyInHeight. In the vanilla, it's perfectly ok.
  17. Hello, I retextured the compass textures, simply changed the direction letters to my language. I do know that the compass texture is being loaded from the inside of the p3d file. So it make things harder because it's impossible to edit the p3d files of BI. Is there a way of changing the textures of the compass p3d without openning it?.
  18. AdirB

    Compass retexture

    I will have to learn modeling now pft.. What about the prefix? Give my PBO prefix the path to the game's textures so it will use mine?
  19. oh it's 4 mounth from now :O I can't wait!! I wondered if there's any chance that you will release a hotfix for the AI flight behavior. They're terribly awful.
  20. I tried the script in three ways: 1. Call the function in a gear generator and run the gear generator with a simple execVM from the init.sqf. The gear generator looks like that:
  21. Hello, the script gives gear to units, but it also sometimes (randomly) doesn't for a few players. The script works with case switching. //null = [unit name,"faction","role"]execVM "bgs.sqf"; _unit = (_this select 0); if (!local _unit) exitWith {}; _unit_faction = (_this select 1); _combat_role = (_this select 2); //BLUEFOR _bluefor_standard_helmets_array = ["UNS_M1_3A", "UNS_M1_5A", "UNS_M1_7A", "UNS_M1_8A", "UNS_M1_4A", "UNS_HP_Helmet"]; _bluefor_uniforms_array = ["UNS_ARMY_BDU_1stCav65pv2", "UNS_ARMY_BDU_1stCav65cpl", "UNS_ARMY_BDU_1stCav651stlt", "UNS_ARMY_BDU_1stCavFlakcpt", "UNS_ARMY_BDU_1stCav65pfc", "UNS_ARMY_BDU_1stCav65ssg", "UNS_ARMY_BDU_1stCavFlaksgt"]; _bluefor_standard_vests_array = ["UNS_M1956_A9", "UNS_M1956_A3", "UNS_M1956_A2", "UNS_M1956_P1", "UNS_M1956_A11", "UNS_M1956_A7"]; _bluefor_standard_backpacks_array = ["UNS_Alice_F9", "UNS_Alice_6", "UNS_Alice_F6", "UNS_Alice_5"]; _bluefor_standard_rifles_array = ["uns_m16"]; _bluefor_standard_handguns_array = ["uns_m1911", "uns_38spec"]; _bluefor_mg_array = ["uns_m60"]; _bluefor_at_array = ["uns_m72"]; _bluefor_rifle_attachments_array = ["uns_s_M16"]; _bluefor_magazines_array = ["uns_m1911mag", "uns_20Rnd_556x45_Stanag", "uns_m72rocket", "uns_m60mag", "uns_38specmag"]; _bluefor_radio_backpacks_array = ["tf_prc77"]; _bluefor_at_backpacks_array = ["UNS_Alice_3"]; _bluefor_radios_array = ["anprc90"]; _bluefor_medical_bandages = ["ACE_elasticBandage", "ACE_quikclot", "ACE_packingBandage"]; _bluefor_medical_items = ["ACE_tourniquet", "ACE_salineIV_500", "ACE_epinephrine", "ACE_morphine", "ACE_adenosine", "ACE_surgicalKit"]; _bluefor_standard_items = ["ItemMap", "ItemCompass", "ItemWatch", "ACE_EarPlugs", "ACE_Clacker", "ACE_DefusalKit", "uns_item_zippo", "ACE_CableTie"]; _bluefor_explosives_array = ["DemoCharge_Remote_Mag", "SatchelCharge_Remote_Mag"]; _bluefor_grenade_array = ["uns_m61gren"]; _bluefor_smoke_grenade_array = ["uns_m18Yellow", "uns_m18red", "uns_m18Blue"]; _bino = "Binocular"; //removing all gear removeAllWeapons _unit; removeAllItems _unit; removeAllAssignedItems _unit; removeUniform _unit; removeVest _unit; removeBackpack _unit; removeHeadgear _unit; removeGoggles _unit; ///////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////BLUEFOR/////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////// if (_unit_faction == "bluefor") then { switch (_combat_role) do { //hint format ["%1%2", _combat_role, _unit_faction]; //Platoon Leader case "PLTL": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 4); _unit addBackpack (_bluefor_radio_backpacks_array select 0); _unit addVest (_bluefor_standard_vests_array select 2); _unit forceAddUniform (_bluefor_uniforms_array select 2); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToVest (_bluefor_magazines_array select 0);}; for "_i" from 1 to 12 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; _unit addWeapon _bino; //Grenades _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_explosives_array select 0);}; _unit addItemToBackpack (_bluefor_explosives_array select 1); //Uniform Items _unit addItemToUniform (_bluefor_standard_items select 4); _unit addItemToUniform (_bluefor_standard_items select 5); _unit addItemToUniform (_bluefor_standard_items select 6); _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); }; //Radio operators case "RTO": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 3); _unit addBackpack (_bluefor_radio_backpacks_array select 0); _unit addVest (_bluefor_standard_vests_array select 1); _unit forceAddUniform (_bluefor_uniforms_array select 1); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToVest (_bluefor_magazines_array select 0);}; for "_i" from 1 to 9 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; _unit addWeapon _bino; //Grenades _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_explosives_array select 0);}; _unit addItemToBackpack (_bluefor_explosives_array select 1); //Uniform Items _unit addItemToUniform (_bluefor_standard_items select 4); _unit addItemToUniform (_bluefor_standard_items select 5); _unit addItemToUniform (_bluefor_standard_items select 6); _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); }; //Platoon Medic (SEAN) case "PLTMEDIC": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 2); _unit addBackpack (_bluefor_standard_backpacks_array select 0); _unit addVest (_bluefor_standard_vests_array select 5); _unit forceAddUniform (_bluefor_uniforms_array select 6); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_magazines_array select 0);}; for "_i" from 1 to 9 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; _unit addWeapon _bino; //Grenades _unit addItemToVest (_bluefor_grenade_array select 0); _unit addItemToVest (_bluefor_smoke_grenade_array select 0); _unit addItemToVest (_bluefor_smoke_grenade_array select 1); _unit addItemToVest (_bluefor_smoke_grenade_array select 2); _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 30 do {_unit addItemToBackpack (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 20 do {_unit addItemToBackpack (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 35 do {_unit addItemToBackpack (_bluefor_medical_bandages select 2);}; for "_i" from 1 to 5 do {_unit addItemToBackpack (_bluefor_medical_items select 0);}; for "_i" from 1 to 6 do {_unit addItemToBackpack (_bluefor_medical_items select 1);}; for "_i" from 1 to 15 do {_unit addItemToBackpack (_bluefor_medical_items select 2);}; for "_i" from 1 to 15 do {_unit addItemToBackpack (_bluefor_medical_items select 3);}; for "_i" from 1 to 15 do {_unit addItemToBackpack (_bluefor_medical_items select 4);}; for "_i" from 1 to 3 do {_unit addItemToBackpack (_bluefor_medical_items select 5);}; //Explosives //NONE //Uniform Items for "_i" from 1 to 4 do {_unit addItemToUniform (_bluefor_magazines_array select 1);}; _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); }; //Fireteam Leaders case "FTL": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 1); _unit addBackpack (_bluefor_standard_backpacks_array select 3); _unit addVest (_bluefor_standard_vests_array select 1); _unit forceAddUniform (_bluefor_uniforms_array select 5); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToVest (_bluefor_magazines_array select 0);}; for "_i" from 1 to 9 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; for "_i" from 1 to 4 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; _unit addWeapon _bino; //Grenades _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_explosives_array select 0);}; _unit addItemToBackpack (_bluefor_explosives_array select 1); //Uniform Items _unit addItemToUniform (_bluefor_standard_items select 4); _unit addItemToUniform (_bluefor_standard_items select 5); _unit addItemToUniform (_bluefor_standard_items select 6); _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); }; //Basic Riflemen case "RIFLEMAN": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 0); _unit addBackpack (_bluefor_standard_backpacks_array select 2); _unit addVest (_bluefor_standard_vests_array select 0); _unit forceAddUniform (_bluefor_uniforms_array select 0); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToVest (_bluefor_magazines_array select 0);}; for "_i" from 1 to 9 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; for "_i" from 1 to 10 do {_unit addItemToBackpack (_bluefor_magazines_array select 1);}; //Grenades _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives _unit addItemToBackpack (_bluefor_explosives_array select 0); //Uniform Items _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); for "_i" from 1 to 4 do {_unit addItemToUniform (_bluefor_magazines_array select 1);}; }; //AT Riflemen case "ATRIFLEMAN": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 0); _unit addBackpack (_bluefor_at_backpacks_array select 0); _unit addVest (_bluefor_standard_vests_array select 0); _unit forceAddUniform (_bluefor_uniforms_array select 0); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); _unit addWeapon (_bluefor_at_array select 0); for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_magazines_array select 0);}; for "_i" from 1 to 9 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; for "_i" from 1 to 4 do {_unit addItemToBackpack (_bluefor_magazines_array select 1);}; for "_i" from 1 to 10 do {_unit addItemToBackpack (_bluefor_magazines_array select 1);}; _unit addItemToBackpack (_bluefor_magazines_array select 2); //Grenades _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives //NONE //Uniform Items _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); }; //Fireteam Medic case "FTMEDIC": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 2); _unit addBackpack (_bluefor_standard_backpacks_array select 0); _unit addVest (_bluefor_standard_vests_array select 5); _unit forceAddUniform (_bluefor_uniforms_array select 6); //Weapons + Magazines _unit addWeapon (_bluefor_standard_rifles_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_magazines_array select 0);}; for "_i" from 1 to 9 do {_unit addItemToVest (_bluefor_magazines_array select 1);}; //Grenades _unit addItemToVest (_bluefor_grenade_array select 0); _unit addItemToVest (_bluefor_smoke_grenade_array select 0); _unit addItemToVest (_bluefor_smoke_grenade_array select 1); _unit addItemToVest (_bluefor_smoke_grenade_array select 2); _unit addItemToBackpack (_bluefor_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 15 do {_unit addItemToBackpack (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 15 do {_unit addItemToBackpack (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 15 do {_unit addItemToBackpack (_bluefor_medical_bandages select 2);}; for "_i" from 1 to 3 do {_unit addItemToBackpack (_bluefor_medical_items select 0);}; for "_i" from 1 to 1 do {_unit addItemToBackpack (_bluefor_medical_items select 1);}; for "_i" from 1 to 5 do {_unit addItemToBackpack (_bluefor_medical_items select 2);}; for "_i" from 1 to 5 do {_unit addItemToBackpack (_bluefor_medical_items select 3);}; for "_i" from 1 to 5 do {_unit addItemToBackpack (_bluefor_medical_items select 4);}; //Explosives //NONE //Uniform Items _unit addItemToUniform (_bluefor_rifle_attachments_array select 0); for "_i" from 1 to 4 do {_unit addItemToUniform (_bluefor_magazines_array select 1);}; }; //Machinegunners case "MG": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 0); _unit addBackpack (_bluefor_standard_backpacks_array select 2); _unit addVest (_bluefor_standard_vests_array select 4); _unit forceAddUniform (_bluefor_uniforms_array select 4); //Weapons + Magazines _unit addWeapon (_bluefor_mg_array select 0); _unit addWeapon (_bluefor_standard_handguns_array select 0); for "_i" from 1 to 2 do {_unit addItemToVest (_bluefor_magazines_array select 0);}; for "_i" from 1 to 3 do {_unit addItemToBackpack (_bluefor_magazines_array select 3);}; for "_i" from 1 to 3 do {_unit addItemToVest (_bluefor_magazines_array select 3);}; //Grenades for "_i" from 1 to 2 do {_unit addItemToVest (_bluefor_grenade_array select 0);}; for "_i" from 1 to 2 do {_unit addItemToBackpack (_bluefor_grenade_array select 0);}; _unit addItemToBackpack (_bluefor_smoke_grenade_array select 0); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 1); _unit addItemToBackpack (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives //NONE //Uniform Items //NONE }; //Pilots case "PILOT": { //uniform, vest, helmet _unit addHeadgear (_bluefor_standard_helmets_array select 5); _unit addVest (_bluefor_standard_vests_array select 3); _unit forceAddUniform (_bluefor_uniforms_array select 3); //Weapons + Magazines _unit addWeapon (_bluefor_standard_handguns_array select 1); for "_i" from 1 to 5 do {_unit addItemToVest (_bluefor_magazines_array select 4);}; _unit addWeapon _bino; //Grenades _unit addItemToVest (_bluefor_grenade_array select 0); _unit addItemToVest (_bluefor_smoke_grenade_array select 0); _unit addItemToVest (_bluefor_smoke_grenade_array select 1); _unit addItemToVest (_bluefor_smoke_grenade_array select 2); //Medical Items for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 0);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 1);}; for "_i" from 1 to 5 do {_unit addItemToUniform (_bluefor_medical_bandages select 2);}; _unit addItemToUniform (_bluefor_medical_items select 0); _unit addItemToUniform (_bluefor_medical_items select 1); //Explosives //NONE //Uniform Items //NONE //Radio _unit linkItem (_bluefor_radios_array select 0); }; }; //Items To Everyone _unit removePrimaryWeaponItem (_bluefor_magazines_array select 1); _unit removePrimaryWeaponItem (_bluefor_magazines_array select 3); _unit removePrimaryWeaponItem (_bluefor_magazines_array select 4); _unit linkItem (_bluefor_standard_items select 0); _unit linkItem (_bluefor_standard_items select 1); _unit linkItem (_bluefor_standard_items select 2); _unit addItemToUniform (_bluefor_standard_items select 3); _unit addItemToBackpack (_bluefor_standard_items select 8); };
  22. Also, I didn't understand why it would be wrong to use @theend3r's method. I'm using if (!local _unit) exitWith {}; in my script, so it will run locally on each unit if I call the function from the unit's init.
×