Page MenuHomeFeedback Tracker

BIS_fnc_ambientAnim uses hardcoded list of NVG items
New, NormalPublic

Description

BIS_fnc_ambientAnim uses this list of NVGs to remove NVGs from units:

if (_gear != "ASIS") then
{
    { _unit unassignItem _x } forEach 
    [ 
        "NVGogglesB_grn_F", 
        "NVGoggles_tna_F",
        "NVGogglesB_gry_F",
        "NVGoggles_ghex_F",
        "NVGoggles_hex_F",
        "NVGoggles_urb_F",
        "nvgoggles", 
        "nvgoggles_opfor", 
        "nvgoggles_indep"
    ];
};

This prescriptive approach means the function doesn't work with any mod or CDLC NVGs, or even any vanilla NVGs added after Apex.

There is a simple fix:

if (_gear != "ASIS") then
{
    _unit unassignItem (hmd _unit);
};

This would make the function work with any item in the NVG slot, instead of only specific classes.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Additional Information

BIS_fnc_ambientAnim also has some other longstanding problems, such as T84113 and only working with like 2 chair objects, but this particular fix would be super easy and can be done without major changes to the function.

Event Timeline

NikkoJT created this task.Apr 17 2022, 5:32 AM
JonBons2020 removed a subscriber: JonBons2020.