Page MenuHomeFeedback Tracker

unitIsUAV returns false for UAV units
Closed, ResolvedPublic

Description

unitIsUAV command returns false for UAV units, only works on UAV vehicles. I think its use could be extended if it also checked if unit is UAV unit (simulation = "UAVPilot").

Details

Severity
Feature
Resolution
Fixed
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Open editor
  2. Place player and start
  3. Execute in console:
_vehicle = createVehicle ["B_UGV_01_F", getPos player, [], 0, ""];
flatten [_vehicle, units createVehicleCrew _vehicle] apply {[typeOf _x, unitIsUAV _x]};
  1. Observe result: [["B_UGV_01_F",true],["B_UAV_AI",false]]

Event Timeline

SaMatra created this task.Feb 16 2023, 7:45 AM

Revision: 150328

also true if unit is UAV pilot(gunner) or remote controlling one

https://community.bistudio.com/wiki/unitIsUAV

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Feb 24 2023, 7:01 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
dedmen set Ref Ticket to AIII-55570.Mar 1 2023, 1:43 PM

What was the reason to have player\unit controlling the UAV return true with this command btw? Just to make command more broad? You can already do that with !isNull getConnectedUAVUnit player, while command name itself suggests that player\unit is UAV while they're just contolling a UAV. If you ask me, I'd revert that to only return true for vehicles and UAV units, not units controlling UAVs, for a better consistency.

Using this moment to put attention at the lack of a proper getters for remote control: T171357, T171207, as getControlledUAVUnit doesn't cover remote control done with remoteControl commands, only through terminals. Fixing remoteControl command is one thing, but at least having proper getters would be a great help.

not units controlling UAVs

UAV AI is the one controlling UAV, what you asked in the first place was inconsistent with the command name but useful for a quick check, otherwise you could have done all this via config look up.

not units controlling UAVs

UAV AI is the one controlling UAV, what you asked in the first place was inconsistent with the command name but useful for a quick check, otherwise you could have done all this via config look up.

Yeah, but the command was introduced anyway, despite its result being single config number away. EIther way, I don't think that units operating terminals should return true with this command. For example if you're going to use this command in say HandleDamage or Killed event handler, you can no longer quickly check if you're dealing with UAVs because it also returns true for players who operate UAVs this very moment.

Ok, but for the future please explain why do you need this or that change with concrete examples to avoid situations like this. tweaked Revision: 150527

Ticket can be closed as resolved.

BIS_fnc_KK closed this task as Resolved.Dec 17 2023, 12:35 PM
BIS_fnc_KK changed Resolution from Open to Fixed.