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




Introduced in

Version:3.4

Description

Description:Checks whether a given vehicle (or vehicle class) is a UAV or UGV.

Syntax

Syntax:vehicle call fn_vbs_isUnmannedVehicle
Parameters:
  • vehicle: Object or String - The vehicle or vehicle class to check.
Return Value:Number - Vehicle type (or nil, if the vehicle does not exits):
  • 0 - Not unmanned
  • 1 - Unmanned aerial vehicle
  • 2 - Unmanned ground vehicle

Warning

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

Examples:
_ret = "vbs_opfor_army_pchela_wdl_x" call fn_vbs_isUnmannedVehicle; // returns 1
_ret = "vbs2_irobot_sugv_x" call fn_vbs_isUnmannedVehicle; // returns 2

Additional Information

See also: fn vbs getUAVModuleLinks
Multiplayer: 
Problems: 

Notes