For the complete documentation index, see llms.txt. This page is also available as Markdown.

GPS Devices and Rangefinder Link

Purpose

This guide shows how to connect your own rangefinder to the RHS GPS receivers (DAGR and Orion), and how to change the images in the GPS image viewer. For the player side, see Navigation and Positioning.

Prerequisites

  • RHS: Status Quo as a dependency of your mod.

  • A rangefinder prefab that uses RHS_SCR_2DLRFComponent or a component that inherits from it (for example RHS_SCR_2DVector21Component, RHS_SCR_2DPDU4Component).

Procedure

  1. Open your rangefinder prefab in Workbench.

  2. Select the rangefinder component (RHS_SCR_2DLRFComponent or a child class).

  3. In the Ranging category, set m_sGPSLinkName to the name that the GPS devices show, for example PDU-4.

  4. Save the prefab.

The GPS devices now list the rangefinder in their link menu when the same character carries both items. After each range measurement, the rangefinder sends the target to the linked GPS device.

An empty m_sGPSLinkName means that the rangefinder cannot be linked.

Send the target from your own component

The base component sends the target after its own range measurement (OnRange). If your component measures the range in its own code, call SendTargetToGPS() after the measurement.

Change the images of a GPS device

  1. Open the GPS device prefab (for example DAGR.et or Orion.et), or a prefab that inherits from it.

  2. Select RHS_GPSGadgetComponent.

  3. In the GPS category, add an entry to m_aImages.

  4. Set m_sName (16 characters maximum) and m_sTexture (an .edds texture).

Example

A rangefinder that can be linked:

A custom rangefinder component that sends the target after its own measurement:

The images of the Orion:

Reference

Component
Attribute
Description

RHS_SCR_2DLRFComponent

m_sGPSLinkName

Name shown by the GPS devices. Empty = no link.

RHS_SCR_2DLRFComponent

m_fMaximumRange

Maximum lasing distance in meters (default 5000).

RHS_GPSGadgetComponent

m_aImages

Images in the image viewer of the device (RHS_GPSImage: m_sName, m_sTexture).

The target goes only to a GPS device that is linked to the rangefinder and carried by the same character.

Prefabs

Prefab
Description

{B1798B0F1258B765}Prefabs/Items/Equipment/Navigation/DAGR/DAGR.et

DAGR GPS receiver

{A55A815F28739FEC}Prefabs/Items/Equipment/Navigation/Orion/Orion.et

Orion GPS receiver

{03810BEF182ADA0B}Prefabs/Items/Equipment/Binoculars/Rangefinder_Vector21.et

Vector 21, link name "Vector 21"

Last updated