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").
Description
Details
- Severity
- Feature
- Resolution
- Fixed
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
- Open editor
- Place player and start
- Execute in console:
_vehicle = createVehicle ["B_UGV_01_F", getPos player, [], 0, ""]; flatten [_vehicle, units createVehicleCrew _vehicle] apply {[typeOf _x, unitIsUAV _x]};
- Observe result: [["B_UGV_01_F",true],["B_UAV_AI",false]]
Related Objects
Event Timeline
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.
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