Difference between revisions of "VN ms fnc hasItems"

From Savage Game Design Wiki
Jump to navigation Jump to search
(Page filling)
m (typo)
 
Line 27: Line 27:
 
|p3n= allItems
 
|p3n= allItems
 
|p3t= boolean
 
|p3t= boolean
|p3d= if set to false, only one of the listed items need to be found
+
|p3d= if set to false, only one of the listed items needs to be found
 
|p3v= true
 
|p3v= true
  

Latest revision as of 21:48, 23 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): global
Effect(s): unknown

Description

Checks if given units have at least one of one or each given item in their inventory.

Syntax

Syntax
[unitsOrGroups, itemClasses, allItems] call VN_ms_fnc_hasItems
Parameters
unitsOrGroups: Array - groups and/or units to be scanned
itemClasses: Array - case-sensitive classname(s) of item(s) to be found
allItems: Boolean - (Optional, default true) if set to false, only one of the listed items needs to be found
Return value
Boolean

Examples

Example 1
// All listed items need to be at least once in the inventory [[player], ["vn_mine_m18_mag", "vn_mine_m18_x3_mag"]] call VN_ms_fnc_hasItems;
Example 2
// One of the listed items needs to be at least once in the inventory [[player], ["vn_mine_m18_mag", "vn_mine_m18_x3_mag"], false] call VN_ms_fnc_hasItems;