Page tree
Skip to end of metadata
Go to start of metadata



Version:19.1.0
Description:

Emulates the behavior of the Control Link Editor Object for UAVs and UGVs. On calling the function, you connect to the given UAV / UGV vehicle, with default parameters set for the available functionality.

The default function behavior is to identify whether it is a UAV or UGV, and act accordingly, but you can override the automatic detection and the default parameters.

Syntax:[player, vehicle, mode, params] call fn_vbs_controlLink

  • player: Object - Player entity that controls the UAV / UGV.
  • vehicle: Object - UAV / UGV vehicle.
  • mode: String - (Optional) Indicates the control type. Can be:
    • "uav"
    • "ugv"
    • "auto" (default)
  • params: Array - (Optional) UAV / UGV override parameters:
    • allowLock: BooleanLocks the camera on a target or a position in-game. If set to true, pressing L in-game locks the camera view (default: true).
    • showHints: Boolean - Helpful hints are shown, explaining the most important keys. (default: true).
    • markTargets: BooleanIf set to true, pressing K in-game adds a target marker to the map at current target position in the camera sight (default: false).
    • minimap: BooleanIf set to true, the GPS / Mini-map button (RCtrl + M) opens a mini-map on-screen that can be moved around (default: false).
    • minimapFilter: String - Map icon visibility filter (default: "UAVside").
    • changeTarget: BooleanIf set to true, you can relocate the target when the camera is locked (default: true).
    • autoOrbit: BooleanIf true, the controlled vehicle orbits around the last waypoint position, or the target, when it runs out of waypoints or locks (default: false).
    • enableRecord: Boolean - Record UAV / UGV camera feed (default: false).
    • recordFrames: Number - Recording frame rate (default: 20).
    • recordResX: Number - Recording X-resolution (default: 640).
    • recordResY: Number - Recording Y-resolution (default: 480).
    • coordType: Position - Data Type - Location coordinates (mission coordinates).
    • recordUI: Boolean - Include the HUD UI, when recording the UAV / UGV camera feed (default: false).
    • externalCam: Boolean - Allow external camera view (default: false).
Return Value:Nothing

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples:
Use auto detection mode and pass all default parameters:
[Player, MISSION_UAV, [true, true, false, false, "UAVside", true, false, false, 20, 640, 480, getGeoCoordSystem select 1, false, false]] call fn_vbs_controlLink;

Use auto detection mode and turn off Hint Text:
[Player, MISSION_UAV, [true, false]] call fn_vbs_controlLink;

Connect to the UAV, using the default settings:
[Player, MISSION_UAV] call fn_vbs_controlLink;
See also:fn_vbs_getUAVModuleLinks
Multiplayer:
Problems: