Legion Studios
HomeDiscord
  • Welcome
  • Features
    • Introduction
    • Impulsor
    • Lighting (Headlamps)
    • Active Camo
    • Weapons
      • Attachment Swapping
      • Aim Down Sight Sounds
    • Equipment
      • Rangefinders
    • Vehicle-In-Vehicle Loading
  • Frameworks
    • Introduction
    • Biology
    • Impulsor
    • Lighting (Headlamps)
    • Active Camo
    • Weapons
      • Attachment Swapping
      • Aim Down Sight Sounds
    • Equipment
      • Rangefinders
    • Vehicle-In-Vehicle Loading
Powered by GitBook
On this page
  • 1. Configuration
  • 1.1 NVG Config
  • 1.2 Creating your own HUD
  1. Frameworks
  2. Equipment

Rangefinders

Adds extra information to Night Vision Goggles.

Legion's "rangefinder framework" allows you to specify a custom display to be created when a player enables NVG or thermals.

1. Configuration

Here's an example of adding the rangefinder HUD from Legion to an NVG.

1.1 NVG Config

class CfgWeapons {
    class TAG_yourNVG {
        // Class name in RscTitles to create
        ls_equipment_rangefinderDisplay = "ls_RscCloneRangefinder";
    };
};

1.2 Creating your own HUD

To create your own HUD element, simply create a new display in configFile >> "RscTitles". If you'd like to use the functionality of the LS rangefinder in your custom one, you can simply inherit from the ls_RscCloneRangefinder class.

class RscTitles {
    class ls_RscCloneRangefinder {
        class controls {
            class Distance;
            class Time;
            class Bearing;
            class BearingArrow;
        };
    };

    class TAG_yourCustomHUD: ls_RscCloneRangefinder {
        idd = ...; // Your unique numerical ID for this display
        class controls: controls {
            class Distance: Distance {
                // Your changes here
            };
            class Time: Time {};
            class Bearing: Bearing {};
            class BearingArrow: BearingArrow {};
        };
    };
};

If you want to add further functionality, you can modify the onLoad and onUnload properties for the display itself. For example:

class TAG_yourCustomHUD: ls_RscCloneRangefinder {
    onLoad = "call ls_equipment_fnc_rangefinderOnLoad; call TAG_fnc_myOnLoad";
    onUnload = "call ls_equipment_fnc_rangefinderOnUnload; call TAG_fnc_myOnUnload";
};
PreviousEquipmentNextVehicle-In-Vehicle Loading

Last updated 4 months ago