Jump to content
Sign in to follow this  
Psycho5553

How do I make an blufor soldier spawn without helmet,night vision and backpack?

Recommended Posts

Hi.

I want to remove the helmet,night vision and backpack from my unit when I spawn.

Can someone please help me? :)

Share this post


Link to post
Share on other sites

Basically you'll have to use this:

this removeItem "classnameoftheitemyouwanttoremove"

or similar commands that begin with "remove":

http://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

Use this to get a list of the classnames of the currently equipped items:

hint format["-> %1", assignedItems this]

(for some items you'll have to use their specific commands, but that should be easy to figure out with the link above)

Share this post


Link to post
Share on other sites
Basically you'll have to use this:

or similar commands that begin with "remove":

http://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

Use this to get a list of the classnames of the currently equipped items:

(for some items you'll have to use their specific commands, but that should be easy to figure out with the link above)

Ok thanks!

Share this post


Link to post
Share on other sites

No, removeItem didn't seem to work, you have to use unassignItem for the NVGs to be removed, whereas the helmet (read: "headwear") slot has its own command; the removeGoggles command is "eyewear", not nightvision goggles; I do not currently know if there is a specific "NVG slot" removal command, hence the use of unassignItem. Therefore:

For the helmet:

removeHeadgear this

For the NVGs:

this unassignItem "NVGoggles"

For the backpack:

removeBackpack this

Thus, collected together:

remove Headgear this; 
this unassignItem "NVGoggles"; 
removeBackpack this; 

Edited by Chortles

Share this post


Link to post
Share on other sites

This is what I use for NVGs being removed.

this unassignItem "NVGoggles";
this removeItem "NVGoggles";

Not sure if anybody has reported a ticket for removeAllItems not removing it, but it should be removing it.

Share this post


Link to post
Share on other sites
No, removeItem didn't seem to work, you have to use unassignItem for the NVGs to be removed, whereas the helmet (read: "headwear") slot has its own command; the removeGoggles command is "eyewear", not nightvision goggles; I do not currently know if there is a specific "NVG slot" removal command, hence the use of unassignItem. Therefore:

For the helmet:

removeHeadgear this

For the NVGs:

this unassignItem "NVGoggles"

For the backpack:

removeBackpack this

Thus, collected together:

remove Headgear this ; 
this unassignItem "NVGoggles"; 
removeBackpack this; 

Thank you! :)

---------- Post added at 14:15 ---------- Previous post was at 14:08 ----------

No, removeItem didn't seem to work, you have to use unassignItem for the NVGs to be removed, whereas the helmet (read: "headwear") slot has its own command; the removeGoggles command is "eyewear", not nightvision goggles; I do not currently know if there is a specific "NVG slot" removal command, hence the use of unassignItem. Therefore:

For the helmet:

removeHeadgear this

For the NVGs:

this unassignItem "NVGoggles"

For the backpack:

removeBackpack this

Thus, collected together:

remove Headgear this ; 
this unassignItem "NVGoggles"; 
removeBackpack this; 

Can you help me also with how to take away Chest and tactical glasses?

Share this post


Link to post
Share on other sites

Tactical glasses use the aforementioned 'eyewear' slot, so you use:

removeGoggles this; 

Unfortunately I don't have the "chest" (body armor?) command handy at the moment, hopefully someone will answer before I get back.

Share this post


Link to post
Share on other sites
Tactical glasses use the aforementioned 'eyewear' slot, so you use:
removeGoggles this; 

Unfortunately I don't have the "chest" (body armor?) command handy at the moment, hopefully someone will answer before I get back.

removeVest is the command for that. removeUniform will remove the clothing aspect also.

Thus to remove Headgear, Vest, Backpack, Goggles, Uniform and NVG's you can use the following;

removeHeadgear this; //remove the headwear
this unassignItem "NVGoggles"; //unassign simply unequip's an item, it does not remove it
removeItem "NVGoggles"; //This will remove the NVG's
removeBackpack this; //remove backpack
removeVest this; //remove vest/webbing
removeGoggles this; //remove glasses, goggles
removeUniform this; //removes the uniform

Edited by TalTsinth

Share this post


Link to post
Share on other sites

Thanks for clearing that up, TalTsinth! Although, I must wonder as to why Arma 3 isn't universal/standard about the unit coming before or after the command...

Share this post


Link to post
Share on other sites

Hi maybe this is usefull for you, below is a script I use for a custom loadout. Create a MY_LOADOUT.sqf file (basically start a new text document then rename it), place it in your \Documents\Arma 3 Alpha - Other Profiles\Your%Username\missions\Your_mission_name.Stratis so it can be accessed within your custom mission. Copy/Paste the code in MY_LOADOUT.sqf, save it.

In game editor to activate loadout script put following line in units init: CustomKit = [this] execvm "MY_LOADOUT.sqf";

_soldier = _this select 0;

//___________________________________

//ROMEVE ALL CURRENT GEAR FROM UNIT

//___________________________________

RemoveAllItems _soldier;

removeAllWeapons _soldier;

removeVest _soldier;

removeallcontainers _soldier;

removeAllAssignedItems _soldier;

removeUniform _soldier;

removeHeadgear _soldier;

removeGoggles _soldier;

//____________________________________

//ADDING BACKPACK AND ITS CONTENT

//____________________________________

_soldier addBackpack "B_Kitbag_mcamo";

_soldier addMagazines ["DemoCharge_Remote_Mag", 4];

_soldier addMagazines ["ClaymoreDirectionalMine_Remote_Mag", 4];

_soldier addItem "NVGoggles";

_soldier addItem "H_HelmetB_paint";

_soldier addItem "muzzle_snds_H";

//____________________________________

//ADDING TACTICAL VEST AND ITS CONTENT

//____________________________________

_soldier addvest "V_PlateCarrierGL_rgr";

_soldier addMagazines ["30Rnd_65x39_caseless_mag", 14];

_soldier addMagazines ["1Rnd_HE_Grenade_shell", 6];

_soldier addMagazines ["16Rnd_9x21_Mag", 4];

_soldier addMagazines ["handGrenade", 2];

//____________________________________

//ADDING UNIFORM AND ITS CONTENT

//____________________________________

_soldier addUniform "U_B_CombatUniform_mcam_vest";

_soldier addItem "FirstAidKit";

_soldier addItem "FirstAidKit";

_soldier addItem "FirstAidKit";

_soldier addItem "FirstAidKit";

_soldier addItem "FirstAidKit";

//____________________________________

//ADDING WEAPONS/ATTACHMENTS

//____________________________________

_soldier addWeapon "arifle_MX_GL_F";

_soldier addPrimaryWeaponItem "acc_flashlight";

_soldier addPrimaryWeaponItem "optic_Hamr";

_soldier addWeapon "hgun_P07_F";

_soldier addHandgunItem "muzzle_snds_L";

//____________________________________

//ADDING ITEMS/GADGETS

//____________________________________

_soldier addItem "ItemGPS";

_soldier assignItem "ItemGPS";

_soldier addItem "ItemMap";

_soldier assignItem "ItemMap";

_soldier addItem "ItemCompass";

_soldier assignItem "ItemCompass";

_soldier addItem "ItemWatch";

_soldier assignItem "ItemWatch";

_soldier addItem "ItemRadio";

_soldier assignItem "ItemRadio";

_soldier addWeapon "Binocular";

_soldier addGoggles "G_Tactical_Clear";

Exit;

Edited by John_Spartan

Share this post


Link to post
Share on other sites

I would believe it come's from the various iterations of the engine itself. Some commands have came from OpF, ArmA and ArmA2 and not all share the same conventions. When I write my own code I tend to try and make it follow some guidelines but even I find it hard to keep to it. Sometime's it just get's a little 'messy'. This is just my view on it of course. I can't say for certain.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×