tmp95 16 Posted September 24, 2013 To remove NVG's for a unit via editor you put in their init field:this unassignItem "NVGoggles"; this removeItem "NVGoggles"; You must first unassign an item that is in use by the unit before you can remove it. This doesn't work?? I've put it into the Init field of a number of OpFor AI and all still have NVGs once on preview within Editor. Share this post Link to post Share on other sites
kylania 568 Posted September 24, 2013 As we said at the top of this very page and in several other threads across the forums, OPFOR NVGoggles are now called: "NVGoggles_OPFOR" Share this post Link to post Share on other sites
Calico 10 Posted January 6, 2014 there we go couldnt find why opfor dint work. thanks ;) Share this post Link to post Share on other sites
Beerkan 71 Posted January 6, 2014 (edited) I remember seeing a script that based on the time of day, would add/remove NV goggles. But for the life of me I can't find it. Searched past the last 100 pages too. Anyone remember it? Edited January 6, 2014 by Beerkan Share this post Link to post Share on other sites
Valery 1 Posted January 6, 2014 @Beerkan Try this in init.sqf: if (!(daytime > 4 && daytime < 19)) then {{[_x, 0.03] execVM "nvgoogle.sqf"} foreach allUnits}; Create a file called nvgoogle.sqf: this unassignItem "NVGoggles"; this removeItem "NVGoggles"; > 4 < 19 you can change this in your mission. Hope it works.Not testing it now. Cheers Share this post Link to post Share on other sites
Beerkan 71 Posted January 6, 2014 (edited) @BeerkanTry this in init.sqf: if (!(daytime > 4 && daytime < 19)) then {{[_x, 0.03] execVM "nvgoogle.sqf"} foreach allUnits}; Create a file called nvgoogle.sqf: this unassignItem "NVGoggles"; this removeItem "NVGoggles"; > 4 < 19 you can change this in your mission. Hope it works.Not testing it now. Cheers Thanks Valery, You've seeded an idea. Create a 'while {alive player} do' condition where based on the time of day, it will add/remove the ng. Also going to use the single command this unlinkItem "NVGoggles_INDEP"; as suggested by Kaylina Edited January 6, 2014 by Beerkan Share this post Link to post Share on other sites
supergruntsb78 67 Posted February 4, 2014 is this somehow also usable on goggles ? i hate all the troops (AND CIVILIANS) spawning with ESS tactical goggles etc.. Share this post Link to post Share on other sites
Ranwer135 308 Posted February 4, 2014 Put this in your unit's init: ;) this unassignItem "NVGoggles"; this removeItem "NVGoggles"; NOTE: I know you've already have this code listed above, but it should work when you put it IN the Unit's INIT. Share this post Link to post Share on other sites
JonyBIgood 10 Posted April 6, 2014 (edited) Put this in your unit's initialization Faction Civil & Blufor : this unassignItem "NVGoggles"; this removeItem "NVGoggles"; Faction Opfor : this unassignItem "NVGoggles_OPFOR"; this removeItem "NVGoggles_OPFOR"; Faction Independent : this unassignItem "NVGoggles_INDEP"; this removeItem "NVGoggles"_INDEP; For all units (ex: east), put this in your file init.sqf { if (side _x == east) then { _x unassignItem "NVGoggles_OPFOR"; _x removeItem "NVGoggles_OPFOR"; }; } foreach allunits; or simply this unlinkItem "NVGoggles"; this unlinkItem "NVGoggles_OPFOR"; this unlinkItem "NVGoggles_INDEP"; Edited April 9, 2014 by JonyBIgood Share this post Link to post Share on other sites
tmp95 16 Posted September 18, 2014 (edited) This code is not working at removing NVG from all OPFOR units this unassignItem "NVGoggles"; this removeItem "NVGoggles"; (nor is when I put in "NVGoggles_Opfor" ) I am using units from Middle East Conflict Mod (but they should still be considered Opfor , correct?) Edited September 18, 2014 by TMP95 Share this post Link to post Share on other sites
jshock 513 Posted September 18, 2014 This code is not working at removing NVG from all OPFOR units this unassignItem "NVGoggles"; this removeItem "NVGoggles"; (nor is when I put in NVGoggles_Opfor Do you mean removing NVGs from all or any OPFOR units? Share this post Link to post Share on other sites
tmp95 16 Posted September 18, 2014 Do you mean removing NVGs from all or any OPFOR units? I would like to remove NVG for all Opfor (for missions I'm building). Or even if I can just do in unit specific would be fine (within a units INIT). Share this post Link to post Share on other sites
jshock 513 Posted September 18, 2014 Well, JonyBIGood gave the code for every unit above: { if (side _x == east) then { _x unassignItem "NVGoggles_OPFOR"; _x removeItem "NVGoggles_OPFOR"; }; } foreach allunits; You could also use the one line command of: { if (side _x == east) then { _x unlinkItem "NVGoggles_OPFOR"; }; } foreach allunits; As stated by Beerkan and Kaylina. Placing these codes in your init.sqf should solve your issue. Share this post Link to post Share on other sites
tmp95 16 Posted September 18, 2014 On further review - This does appear to be related to Middle East Conflict units - As CSAT units DO have their NVG removed! Huh. Wonder how to remove off MEC units. Share this post Link to post Share on other sites
jshock 513 Posted September 18, 2014 (edited) On further review - This does appear to be related to Middle East Conflict units - As CSAT units DO have their NVG removed! Huh. Wonder how to remove off MEC units. You will need to find the classname list from that mod and look for the NVGs that they use. (Usually found in the mod folder, in your A3 directory or PW6 directory respectively, as a pdf or txt file). That particular mod has a lot of required mods however and could be pulling the NVG class from anywhere. Edited September 18, 2014 by JShock Share this post Link to post Share on other sites
tmp95 16 Posted September 18, 2014 @Jshock. Thanks! That is it. I've asked on the MEC thread for some help on how to remove! Share this post Link to post Share on other sites
thefinn 3 Posted November 6, 2014 Hrm... my guys still have NVG's... love to know why. I even cut and paste this in... has something changed ? this unassignItem "NVGoggles"; this removeItem "NVGoggles"; Share this post Link to post Share on other sites
Tavish 41 Posted November 6, 2014 (edited) Hrm... my guys still have NVG's... love to know why. I even cut and paste this in... has something changed ?this unassignItem "NVGoggles"; this removeItem "NVGoggles"; Me too... gonna go check the feedback tracker, this worked last week! Confused myself there... NVGoggles for BLUFOR NVGoggles_OPFOR for OPFOR NVGoggles_INDEP for IND Edited November 6, 2014 by Tavish Share this post Link to post Share on other sites
jshock 513 Posted November 6, 2014 Me too... gonna go check the feedback tracker, this worked last week!EDIT: After a bit of testing, this only works on blufor units. OPFOR and IND both still have NVGs on. They do have different classnames for each NV goggle by side (don't ask me why...). Blufor = "NVGoggles" Opfor = "NVGoggles_OPFOR" Independent = "NVGoggles_INDEP" Share this post Link to post Share on other sites
Tavish 41 Posted November 6, 2014 Yeah, just realised my mistake Share this post Link to post Share on other sites
killzone_kid 1331 Posted November 6, 2014 Hrm... my guys still have NVG's... love to know why. I even cut and paste this in... has something changed ?this unassignItem "NVGoggles"; this removeItem "NVGoggles"; Have you checked BIKI example? https://community.bistudio.com/wiki/unassignItem Share this post Link to post Share on other sites
thefinn 3 Posted November 6, 2014 Found that, thanks dude! Also using your example on the wiki for making units do automatic weapons fire ;) Share this post Link to post Share on other sites