Page MenuHomeFeedback Tracker

Missing UAV terminal scripting commands
New, NormalPublic

Description

After working and figuring out all details about workings of UAV Terminals I figured that they're pretty buggy and hard to be fixed through scripting. Here is collection of missing scripting commands that are needed to make working with terminals much easier.

1. No way to disconnect UAV from terminal if its not equipped by the player
connectTerminalToUAV can only disconnect if terminal is equipped by the player, I originally wanted to suggest extending the command to make objNull connectTerminalToUAV uav disconnect the UAV from whatever it was connected to, but this has a slight potential for backwards compatibility issues.

  • Solution: Introduce new command: BOOL = disconnectUAV ENTITY

ENTITY is UAV vehicle
BOOL returns true if it was connected and disconnected, false if it wasn't connected and disconnection wasn't needed

2. No way to get terminal that UAV is connected to
isUAVConnected only returns a flag but nothing about terminal and where it is.

  • Solution: Introduce new command: ARRAY = getConnectedTerminal ENTITY

ENTITY is UAV that might be connected to some terminal
ARRAY consists of [ENTITY, STRING] with ENTITY being vehicle that holds the terminal: player's backpack, ground weapon holder, a vehicle, player unit (assigned to GPS slot) and STRING is terminal class name.
Return empty array if UAV is not connected anywhere.

3. No way to get which player\unit controls certain UAV unit
Right now there is no easy way to know which player\unit controls certain UAV unit, you can only get a link from unit with getConnectedUAVUnit but this will require you to walk through all units in the game.

  • Solution: Introduce getter commands for remote control: ENTITY = getRemoteControlBy ENTITY, I have a dedicated ticket about this problem: T171207

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
UAV (Unmanned Aerial Vehicle)
Additional Information

Brief of new commands:
BOOL = disconnectUAV ENTITY
ARRAY = getConnectedTerminal ENTITY
ENTITY = getRemoteControlBy ENTITY

If somebody is willing to do this, I'll make repro scripts to quickly test new commands.

Event Timeline

SaMatra created this task.Apr 4 2023, 1:15 PM

have you looked at UAV actions via action command?

SaMatra added a comment.EditedApr 4 2023, 3:42 PM

have you looked at UAV actions via action command?

I did, none work. Typical situation would be: Player connects to UAV with Terminal, then drops the terminal somewhere, until terminal is deleted or equipped and disconnected, you can't connect to the drone anymore with a new terminal. This also creates issues in MP, remote clients can still connect and if hidden terminal is picked up you end up with several players connected to same drone which game supposedly doesn't allow.

SaMatra added a comment.EditedApr 4 2023, 3:49 PM

Also I'd ditch this entire hardcoded UAV Terminal system and written my own with remoteControl but the command is absolutely terrible, my ticket T171207 has an example how player can be put into remote control without a proper way to revert it. And there are no getters for remote control either. Fixing remoteControl will also be appreciated.