BIS fnc itemType: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *W([a-z ])" to "$1 - w$2")
 
(38 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


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


| arma3 |= Game name
|gr1= Inventory


|1.08|= Game version
|descr= {{Feature|important|Be very careful with this function as certain mods modify the categories making this function unreliable!}}
____________________________________________________________________________________________
Returns item category and type.
{{{!}} class="wikitable"
! Weapon / VehicleWeapon
! VehicleWeapon
! Item
! Equipment
! Magazine
! Mine
{{!}}- style="vertical-align: top"
{{!}}
* AssaultRifle
* BombLauncher
* Cannon
* GrenadeLauncher
* Handgun
* Launcher
* MachineGun
* Magazine
* MissileLauncher
* Mortar
* RocketLauncher
* Shotgun
* Throw
* Rifle
* SubmachineGun
* SniperRifle
{{!}}
* Horn
* CounterMeasuresLauncher
* LaserDesignator
{{!}}
* AccessoryMuzzle
* AccessoryPointer
* AccessorySights
* AccessoryBipod
* Binocular
* Compass
* FirstAidKit
* GPS
* LaserDesignator
* Map
* Medikit
* MineDetector
* NVGoggles
* Radio
* Toolkit
* UAVTerminal
* VehicleWeapon
* Unknown
* UnknownEquipment
* UnknownWeapon
* Watch
{{!}}
* Glasses
* Headgear
* Vest
* Uniform
* Backpack
{{!}}
* Artillery
* Bullet
* CounterMeasures
* Flare
* Grenade
* Laser
* Missile
* Rocket
* Shell
* ShotgunShell
* SmokeShell
* UnknownMagazine
{{!}}
* Mine
* MineBounding
* MineDirectional
{{!}}}


| <pre>/*
|s1= weaponClass call [[BIS_fnc_itemType]]


Description:
|p1= weaponClass: [[String]] - weapon's class name
Return item category and type. Recognized types are:


Weapon / VehicleWeapon
|r1= [[Array]] in format
AssaultRifle
* 0: category
BombLauncher
* 1: type
Cannon
GrenadeLauncher
Handgun
Launcher
MachineGun
Magazine
MissileLauncher
Mortar
RocketLauncher
Shotgun
Throw
Rifle
SubmachineGun
SniperRifle
VehicleWeapon
Horn
CounterMeasuresLauncher
LaserDesignator
Item
AccessoryMuzzle
AccessoryPointer
AccessorySights
                        AccessoryBipod
Binocular
Compass
FirstAidKit
GPS
LaserDesignator
Map
Medikit
MineDetector
NVGoggles
Radio
Toolkit
UAVTerminal
VehicleWeapon
Unknown
UnknownEquipment
UnknownWeapon
Watch
Equipment
Glasses
Headgear
Vest
Uniform
Backpack
Magazine
Artillery
Bullet
CounterMeasures
Flare
Grenade
Laser
Missile
Rocket
Shell
ShotgunShell
SmokeShell
UnknownMagazine
Mine
Mine
MineBounding
MineDirectional


Parameter(s):
|x1= <sqf>"arifle_MX_pointer_F" call BIS_fnc_itemType;</sqf>
0: STRING - item class
 
Returns:
ARRAY in format [category,type]
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_itemType]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[currentWeapon]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
<dt></dt>
<dd class="notedate">Posted on 2017-05-14</dd>
<dt class="note">[[User:Demellion|Demellion]]</dt>
<dd class="note">
More detailed description about some specific Weapons and Vehicle Weapons:
<sqf>GrenadeLauncher // Underbarrel and HGLs
BombLauncher // Aircraft bomb throw weapons.
MissileLauncher // Guided missile weapons (alike Titan series).
RocketLauncher // Non-guided missile weapons (alike RPG32).
Cannon // Main vehicle turret (alike tank cannon).
Throw // Throw-like weapons (grenade weapon, melee weapons from mods, etc).
</sqf>
</dd>
 
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Inventory|{{uc:itemType}}]]
[[Category:Functions|{{uc:itemType}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:itemType}}]]

Latest revision as of 17:35, 8 November 2023

Hover & click on the images for description

Description

Description:
Be very careful with this function as certain mods modify the categories making this function unreliable!

Returns item category and type.

Weapon / VehicleWeapon VehicleWeapon Item Equipment Magazine Mine
  • AssaultRifle
  • BombLauncher
  • Cannon
  • GrenadeLauncher
  • Handgun
  • Launcher
  • MachineGun
  • Magazine
  • MissileLauncher
  • Mortar
  • RocketLauncher
  • Shotgun
  • Throw
  • Rifle
  • SubmachineGun
  • SniperRifle
  • Horn
  • CounterMeasuresLauncher
  • LaserDesignator
  • AccessoryMuzzle
  • AccessoryPointer
  • AccessorySights
  • AccessoryBipod
  • Binocular
  • Compass
  • FirstAidKit
  • GPS
  • LaserDesignator
  • Map
  • Medikit
  • MineDetector
  • NVGoggles
  • Radio
  • Toolkit
  • UAVTerminal
  • VehicleWeapon
  • Unknown
  • UnknownEquipment
  • UnknownWeapon
  • Watch
  • Glasses
  • Headgear
  • Vest
  • Uniform
  • Backpack
  • Artillery
  • Bullet
  • CounterMeasures
  • Flare
  • Grenade
  • Laser
  • Missile
  • Rocket
  • Shell
  • ShotgunShell
  • SmokeShell
  • UnknownMagazine
  • Mine
  • MineBounding
  • MineDirectional
Execution:
call
Groups:
Inventory

Syntax

Syntax:
weaponClass call BIS_fnc_itemType
Parameters:
weaponClass: String - weapon's class name
Return Value:
Array in format
  • 0: category
  • 1: type

Examples

Example 1:
"arifle_MX_pointer_F" call BIS_fnc_itemType;

Additional Information

See also:
currentWeapon

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
Posted on 2017-05-14
Demellion
More detailed description about some specific Weapons and Vehicle Weapons:
GrenadeLauncher // Underbarrel and HGLs BombLauncher // Aircraft bomb throw weapons. MissileLauncher // Guided missile weapons (alike Titan series). RocketLauncher // Non-guided missile weapons (alike RPG32). Cannon // Main vehicle turret (alike tank cannon). Throw // Throw-like weapons (grenade weapon, melee weapons from mods, etc).