Using the old command for adding Night Vision Goggles to units (this addWeapon "NVGoggles";) does not give the unit the goggle item into inventory or on the model, but lets the unit use the goggles anyway.
Description
Details
- Legacy ID
- 1100601903
- Severity
- Minor
- Resolution
- Fixed
- Reproducibility
- Always
- Category
- Scripting
- Open editor
- Place down civilian player
- Type "this addWeapon "NVGoggles";" into the init field
- Preview the mission
- Turn on your night vision goggles
- Observe as your screen turns all night-visiony
- Open your inventory
- Observe your inventory not containing the goggles
This also works on actual soldiers, not just civilian units. Using a civilian unit is just handy for demonstration purposes, as you don't need to remove any items from it.
Event Timeline
Actually the NVG probably sit in the binocular slot. But since they have no icon for clients, you don't see it.
What qwasder said. NVG are now considered "Items", you need to use addItem. If you add NVG as Weapon, they will appear without an icon.
it doesn't make sense to have binoc's added with addWeapon, either. They should both just be assignable items.
@SaMatra: Yes, I know you're supposed to use addItem, which is why I described the addWeapon command as "old"; it is the one the previous games used. Regardless of whether you're supposed to use the addWeapon command, however, it doesn't seem like being able to add invisible but useable NVGs would be an intended feature.
It is a minor issue (and I probably should've put severity as trivial), but it is a bug and I thought I'd report it.
This issue was processed by our team and will be looked into. We thank you for your feedback.
i understand your issue but I believe this is the correct way to do it
Code:
_unit addItem "NVGoggles";
_unit assignItem "NVGoggles";
this adds the image to your gear so u can see u have NV available and it also will work as intended
if you want binoculars use this
_unit addweapon "Binocular";
Note: this method i only tested on the current beta
I'm aware of the correct way to do it, which is why I described the addWeapon-method as old (it was used for NVGs in the previous games). I reported this because, even if the command should not be used, the way it functions is clearly not intentional.
You would know this if you read the previous comments, where someone already told me to use addItem and I responded with almost this exact same message.
@djotacon if you dont have space in inventory it won't add nvgoggles. additem adds it to inventory. if you want to add it to the nvg slot you have to link them:
player linkItem "NVGoggles"
I cannot reproduce the problem stated in this ticket.
player addWeapon "NVGoggles"
adds NVGoggles makes them visible and makes them usable.
Same here. Unable to reproduce in current dev build, probably fixed with some other bug. Marking as resolved.
Mass-closing resolved issues updated only last year - assuming fixed correctly.
Cheers!