Page MenuHomeFeedback Tracker

Night vision goggles cannot be added or removed via scripting
Closed, ResolvedPublic


The scripting commands for adding and removing weapons do not work on night vision goggles, though they do work for binoculars and other items in cfgWeapons.

In the reproduction, binoculars were used to verify since "NVGoggles" is a subclass of "Binocular" in cfgWeapons.


Legacy ID
No Bug
Steps To Reproduce
  1. Place down a playable civilian man in the editor. Civilians start with an empty inventory.
  2. In the Initialization box, enter:

this addWeapon "NVGoggles"; this addWeapon "Binocular";

  1. Preview the mission. You will see that the binoculars were added, but not the night-vision goggles.
  2. Night vision goggles are also not removed with the removeWeapon and removeAllWeapon commands, but binoculars are.

Event Timeline

Squint edited Steps To Reproduce. (Show Details)Mar 7 2013, 5:00 AM
Squint edited Additional Information. (Show Details)
Squint set Category to Scripting.
Squint set Reproducibility to Always.
Squint set Severity to Minor.
Squint set Resolution to No Bug.
Squint set Legacy ID to 3550712087.May 7 2016, 11:18 AM

use: " this addItem " instead of the " this addWeapon "

this is the command for adding the night vision-goggles:
this addItem "NVGoggles"; this assignitem "NVGoggles";

when removing them, as one might expect, you have to unassign them first and then remove the item. Hope this helps.