Rossrox 10 Posted March 6, 2013 Okay, so really enjoying the alpha, doing some mission editing, but I cannot remove the night vision goggles from the OpFor units. I placed this removeweapon "NVGoggles"; in the init sections of the units, but it does not work, I can only assumed that its not a weapon anymore, or the classname has changed. What am I doing wrong!?:mad: Share this post Link to post Share on other sites
Ryousuke 1 Posted March 6, 2013 Have you tried removeheadgear? Share this post Link to post Share on other sites
Rossrox 10 Posted March 6, 2013 Placing removeHeadgear unit; in an OpFors init? Does not work, on its own at least. Do I need to change the unit variable? Share this post Link to post Share on other sites
tonic-_- 53 Posted March 6, 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. Share this post Link to post Share on other sites
Rossrox 10 Posted March 6, 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. You absolute legend. Share this post Link to post Share on other sites
Orion987 1 Posted March 6, 2013 Great find! Thanks Tonic. I tried using the removeGoggles script but that didn't work at all. Share this post Link to post Share on other sites
nedley 10 Posted March 7, 2013 On a similar note: How to remove optics! this unassignitem "optic_Arco"; this removeweapon "optic_Arco" does not work Share this post Link to post Share on other sites
tonic-_- 53 Posted March 7, 2013 On a similar note: How to remove optics!this unassignitem "optic_Arco"; this removeweapon "optic_Arco" does not work The optic's are not considered as a weapon, they are a item. All attachments, clothing, headgear, backpacks, vests are all items. If you wanted to remove the attachments / optics you use the following format: this removeItemFromPrimaryWeapon "optic_acro"; Share this post Link to post Share on other sites
Walsh.D 0 Posted March 8, 2013 Ah, was struggling with this for awhile now, thanks Tonic :) Share this post Link to post Share on other sites
reclusive7 10 Posted March 8, 2013 this unassignItem "NVGoggles"; this removeItem "NVGoggles"; Share this post Link to post Share on other sites
AnGeLo 1 Posted March 21, 2013 guys i make 1 mission and i want to play in the night without nv googles and in my waepon flashlight so i add in all players init this unassignItem "NVGoggles"; this addPrimaryWeaponItem "acc_flashlight"; and work good but if i die and i make respawn the waepon return to deafault and i have again nv and no flashlight :( so what i need to do anyone can help here??? this probelm is in arma 3 Share this post Link to post Share on other sites
HKFlash 9 Posted March 22, 2013 (edited) The optic's are not considered as a weapon, they are a item. All attachments, clothing, headgear, backpacks, vests are all items. If you wanted to remove the attachments / optics you use the following format: this removeItemFromPrimaryWeapon "optic_acro"; What about adding the Item? addItemForPrimaryWeapon? EDIT: Found it. addPrimaryWeaponItem Edited March 22, 2013 by HKFlash Share this post Link to post Share on other sites
rtek 10 Posted June 13, 2013 I went through each individual opfor soldier i put down and put in the script. How do I remove nvg's from soldier put down in a Site? You know, the ones we can't see in the editor but spawn in because there's a site there. I tried to put in the init but there's not enough space for the whole script. Share this post Link to post Share on other sites
tonic-_- 53 Posted June 13, 2013 I went through each individual opfor soldier i put down and put in the script. How do I remove nvg's from soldier put down in a Site? You know, the ones we can't see in the editor but spawn in because there's a site there. I tried to put in the init but there's not enough space for the whole script. Something like this on mission start via init.sqf { if(side _x == east) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; }; } foreach (allUnits); Change east to whatever side it is. Share this post Link to post Share on other sites
headswe 17 Posted June 13, 2013 If they are spawned from a site, add a small sleep for a second or two otherwise it might become a issue where the code is run before the units are spawned in. Share this post Link to post Share on other sites
rtek 10 Posted June 30, 2013 (edited) I'll try that. How do I add a small sleep? Not sure I follow what you mean. ---------- Post added at 00:19 ---------- Previous post was at 00:05 ---------- Something like this on mission start via init.sqf { if(side _x == east) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; }; } foreach (allUnits); Change east to whatever side it is. What do I put if I want to remove nightvision from all opfor on the entire map? Do I have to put this script 5 times for N, E, S, W, and Center? I've copy/pasted this into my init.sqf and went in to see, but it doesn't work. It did however, remove the nightvision from my character I was using to move around, but all the A.I. from the site had their night vision. I just want to assign this removing of nvgoggles to the sites. There has to be a way. I wish it was as easy as putting in Remove all nightvision from all opfor; and it actually work. Edited June 30, 2013 by RTEK Share this post Link to post Share on other sites
kylania 568 Posted June 30, 2013 That code you quoted does exactly that, removes all the NVGoggles from all east units on the map. Note that "east" refers to OPFOR/Red/TheBadGuys and not "units on the east side of the map". Make sure your init.sqf isn't which might explain why it wasn't working for you. Share this post Link to post Share on other sites
RushHour 11 Posted September 2, 2013 (edited) 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. I tried this but it won´t work. I´m on Dev Build. http://i.imgur.com/0FDwraL.jpg (167 kB) Edit: i found it, turns out you need to specify the fact that you are an independent......brilliant stuff.. Here is the code for Independents removing NV Goggles. this unassignItem "NVGoggles_INDEP"; this removeItem "NVGoggles_INDEP"; Edited September 2, 2013 by RushHour Share this post Link to post Share on other sites
kylania 568 Posted September 2, 2013 You can now use this: this unlinkItem "NVGoggles_INDEP"; To unassign and remove at the same time. Share this post Link to post Share on other sites
Von Quest 1163 Posted September 13, 2013 ...and now OPFOR is: "NVGoggles_OPFOR"; Share this post Link to post Share on other sites
phil671 12 Posted September 23, 2013 ...and now OPFOR is: "NVGoggles_OPFOR"; Thank you for the trick , adding OPFOR ............ But regarding BLUE this is not needed, correct? Share this post Link to post Share on other sites
tmp95 16 Posted September 23, 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. Thank you for this! - Also, if I put this into the Group leaders init field (will it remove NVGs from all men within his unit? or do I need to do it for each individual man?) Thanks again Share this post Link to post Share on other sites
tmp95 16 Posted September 23, 2013 Something like this on mission start via init.sqf { if(side _x == east) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; }; } foreach (allUnits); Change east to whatever side it is. Excellent - So this is the quickest way to set all OpFor units to having no NVG. Thank you! Share this post Link to post Share on other sites