BIS fnc crewCount: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " (\|[pr][0-9]+ *= *[^-]+) *- *A([a-z])" to " $1 - a$2") |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *C([a-eg-z])" to "$1 - c$2") |
||
Line 10: | Line 10: | ||
|s1= param call [[BIS_fnc_crewCount]] | |s1= param call [[BIS_fnc_crewCount]] | ||
|p1= [[String]] - | |p1= [[String]] - classname of vehicle. | ||
|p2= [[Boolean]] - True if cargo seats should be included (see notes) | |p2= [[Boolean]] - True if cargo seats should be included (see notes) | ||
Revision as of 13:59, 8 November 2023
Description
- Description:
- Function that counts amount of seats, both for crew and cargo seats.
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- param call BIS_fnc_crewCount
- Parameters:
- String - classname of vehicle.
- Boolean - True if cargo seats should be included (see notes)
- Return Value:
- Number - amount of seats in vehicle.
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- crew
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 2014-10-01 - 20:12 (UTC)
- Tryteyker-
-
This function goes through config values and as such is dependant on these. In some instances, this can lead to weird results; the user may, for example, expect the skids on the Littlebird to be cargo slots.
However, in reality, they are not and as such will be counted even if the boolean value is set to false.
If the bool value is set to true, it will return the total amount of seats available. To get the cargo seats only, running this function twice (once with false and once with true as bool values), and then subtracting the total with crew-only will yield the cargo (F^cargo = Ftotal - Fcrew) slots.
Crew slots include gunners and in some instances some cargo slots. The above may not work for every vehicle.