BIS fnc objectType: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.08


| arma3 |= Game name
|gr1= Object Manipulation


|1.00|= Game version
|descr= Return object category and type.
____________________________________________________________________________________________


| <pre>/*
|s1= anObject call [[BIS_fnc_objectType]]


Description:
|p1= anObject: [[String]] or [[Object]]
Return object category and type. Recognized types are:


Soldier
|r1= [[Array]] - in format [category, type]. One of:
AT
{{{!}} class="wikitable"
Civilian
! Soldier
Diver
! Vehicle / VehicleAutonomous
Infantry
! Logic
Medic
! Object
MG
{{!}}- style="vertical-align: top"
Officer
{{!}}
Pilot
* AT
Sniper
* Civilian
SpecialForces
* Diver
UAVPilot
* Infantry
Vehicle / VehicleAutonomous
* Medic
Car
* MG
Helicopter
* Officer
Motorcycle
* Pilot
Plane
* Sniper
Ship
* SpecialForces
StaticWeapon
* UAVPilot
Submarine
{{!}}
TrackedAPC
* Car
Tank
* Helicopter
WheeledAPC
* Motorcycle
Logic
* Plane
Logic
* Ship
Module
* StaticWeapon
Object
* Submarine
Ammobox
* TrackedAPC
Animal
* Tank
Backpack
* WheeledAPC
Camera
{{!}}
Church
* Logic
Effect
* Module
Fire
{{!}}
Flag
{{Columns|2|
Helipad
* Ammobox
House
* Animal
Marker
* Backpack
Mine
* Camera
Parachute
* Church
Seagull
* Effect
Sound
* Fire
Target
* Flag
Thing
* Helipad
Trigger
* House
UnknownObject
* Marker
VASI
* Mine
Wreck
* Parachute
 
* Seagull
Parameter(s):
* Sound
0: STRING - item class
* Target
 
* Thing
Returns:
* Trigger
ARRAY in format [category,type]
* UnknownObject
*/
* VASI
 
* Wreck
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
}}
____________________________________________________________________________________________
{{!}}}
 
| <!-- [] call [[BIS_fnc_objectType]]; --> |= Syntax
 
|p1= |= Parameter 1


| |= Return value
|x1= <sqf>private _myType = player call BIS_fnc_objectType;</sqf>
____________________________________________________________________________________________


|x1= <code></code> |=
|x2= <sqf>private _myType = "B_MRAP_01_F" call BIS_fnc_objectType;</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[typeOf]] [[countType]] [[isKindOf]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Objects|{{uc:objectType}}]]
[[Category:Functions|{{uc:objectType}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:objectType}}]]

Latest revision as of 23:44, 12 July 2022

Hover & click on the images for description

Description

Description:
Return object category and type.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
anObject call BIS_fnc_objectType
Parameters:
anObject: String or Object
Return Value:
Array - in format [category, type]. One of:
Soldier Vehicle / VehicleAutonomous Logic Object
  • AT
  • Civilian
  • Diver
  • Infantry
  • Medic
  • MG
  • Officer
  • Pilot
  • Sniper
  • SpecialForces
  • UAVPilot
  • Car
  • Helicopter
  • Motorcycle
  • Plane
  • Ship
  • StaticWeapon
  • Submarine
  • TrackedAPC
  • Tank
  • WheeledAPC
  • Logic
  • Module
  • Ammobox
  • Animal
  • Backpack
  • Camera
  • Church
  • Effect
  • Fire
  • Flag
  • Helipad
  • House
  • Marker
  • Mine
  • Parachute
  • Seagull
  • Sound
  • Target
  • Thing
  • Trigger
  • UnknownObject
  • VASI
  • Wreck

Examples

Example 1:
private _myType = player call BIS_fnc_objectType;
Example 2:
private _myType = "B_MRAP_01_F" call BIS_fnc_objectType;

Additional Information

See also:
typeOf countType isKindOf

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note