Jump to content
Sign in to follow this  
Phonix644

Equiping Night Vision and Rebrether On Spawn - Need Help Plz!

Recommended Posts

Hey Guys,

I am trying to spawn soldiers in already wearing night vision but are unable to do so. I have searched and all I could find was this:

this assignItem "NVGoggles";

and

this assignItem "V_RebreatherB";

But neither seem to work :/

Any ideas? Am I using the wrong code?

Thanks guys :)

Share this post


Link to post
Share on other sites
try:

this addweapon "NVGoggles";

Hmm still no luck mate - I am trying to add this to a diver, and it should be able to work - any other ideas?

Share this post


Link to post
Share on other sites

try this:

this addItem "NVGoggles"; 
this assignItem "NVGoggles"; 
this addItem "V_RebreatherB"; 
this assignItem "V_RebreatherB";

It works just fine for me for all "toolbelt" items.

But you need to add it and then assign it to the player.

Maybe you need to change V_RebreatherB to:

this addHeadgear "V_RebreatherB"; 

Dont actually know if it needs to be assigned or just given, but if its headgear, you need to remove the current helmet of the unit :)

If the unit has a name, just replace "this" with what ever your unit name is :)

I did this for one of my snipers, you can adapt it to your diver:

_unit = _this select 0;

// Remove original equipment
removeallweapons _unit;
removeallassigneditems _unit;
removeallcontainers _unit;


// Add clothing
_unit addUniform "U_B_CombatUniform_mcam_vest";
_unit addHeadgear "H_MilCap_mcamo";
_unit addVest "V_BandollierB_khk";

// Add weapons
_unit addMagazines ["20Rnd_762x45_Mag", 5];
_unit addWeapon "srifle_EBR_ARCO_point_grip_F";
_unit addPrimaryweaponitem "muzzle_snds_B";
_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addMagazines ["30Rnd_9x21_Mag", 3];
_unit addWeapon "hgun_P07_snds_F";


_unit addMagazines ["HandGrenade", 2];


// Add items
_unit addWeapon "Binocular";
_unit addItem "FirstAidKit"; 
_unit addItem "FirstAidKit";

_unit additem "ItemCompass"; 
_unit assignItem "ItemCompass"; 
_unit additem "ItemMap"; 
_unit assignItem "ItemMap"; 
_unit additem "ItemRadio"; 
_unit assignItem "ItemRadio"; 
_unit additem "ItemWatch"; 
_unit assignItem "ItemWatch"; 
_unit addItem "ItemGPS"; 
_unit assignItem "ItemGPS";

Edited by Byrgesen

Share this post


Link to post
Share on other sites
try this:

this addItem "NVGoggles"; 
this assignItem "NVGoggles"; 
this addItem "V_RebreatherB"; 
this assignItem "V_RebreatherB";

It works just fine for me for all "toolbelt" items.

But you need to add it and then assign it to the player.

Maybe you need to change V_RebreatherB to:

this addHeadgear "V_RebreatherB"; 

Dont actually know if it needs to be assigned or just given, but if its headgear, you need to remove the current helmet of the unit :)

If the unit has a name, just replace "this" with what ever your unit name is :)

I did this for one of my snipers, you can adapt it to your diver:

_unit = _this select 0;

// Remove original equipment
removeallweapons _unit;
removeallassigneditems _unit;
removeallcontainers _unit;


// Add clothing
_unit addUniform "U_B_CombatUniform_mcam_vest";
_unit addHeadgear "H_MilCap_mcamo";
_unit addVest "V_BandollierB_khk";

// Add weapons
_unit addMagazines ["20Rnd_762x45_Mag", 5];
_unit addWeapon "srifle_EBR_ARCO_point_grip_F";
_unit addPrimaryweaponitem "muzzle_snds_B";
_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addMagazines ["30Rnd_9x21_Mag", 3];
_unit addWeapon "hgun_P07_snds_F";


_unit addMagazines ["HandGrenade", 2];


// Add items
_unit addWeapon "Binocular";
_unit addItem "FirstAidKit"; 
_unit addItem "FirstAidKit";

_unit additem "ItemCompass"; 
_unit assignItem "ItemCompass"; 
_unit additem "ItemMap"; 
_unit assignItem "ItemMap"; 
_unit additem "ItemRadio"; 
_unit assignItem "ItemRadio"; 
_unit additem "ItemWatch"; 
_unit assignItem "ItemWatch"; 
_unit addItem "ItemGPS"; 
_unit assignItem "ItemGPS";

Perfect mate! Worked like a charm Thank You!

Yeah my problem was I wasn't doing both additem and assignitem.

Also thanks for your script for your guy, I was able to get other stuff out of that :)

My only question now left would be is there a way to make the diver have the rebrether on regardless of in the water or on land? I Might have to start another topic though.

Share this post


Link to post
Share on other sites

Can I ask you how you got them to spawn in with the NV goggles on? I have no problem getting them into a divers inventory, but assignItem doesn't seem to force them to the proper slot.

Share this post


Link to post
Share on other sites

The rebreather vest remains on while out of the water but the diver will automatically remove his goggles, fins, and mask. I don't think there is a way to stop that.

If you want the player to start with NVGs on then use this: player action ["nvGoggles", player];

Share this post


Link to post
Share on other sites
The rebreather vest remains on while out of the water but the diver will automatically remove his goggles, fins, and mask. I don't think there is a way to stop that.

If you want the player to start with NVGs on then use this: player action ["nvGoggles", player];

Just tried that and funnily enough it just put's the unit in Night Vision mode (fullscreen instead of the circle as well oddly enough), even without NVGs in inventory.

Pics for proof

yOaiAvD.png

http://i.imgur.com/yOaiAvD.png

PHrZ5iv.jpg

http://i.imgur.com/PHrZ5iv.jpg

Your direct player action ["NVGoggles", player]; and substituting this with both player bits yields the same results as well

Share this post


Link to post
Share on other sites

Good find, I tested also on a diver without any NVGs and get the same screen above.

Share this post


Link to post
Share on other sites

Yes if you have nvgs in your inventory then you will get the normal view pictured above otherwise your entire screen will be in the NVG view.

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  

×