{"name":"emptyPositions","operator":null,"title":"emptyPositions","type":"command","url":"https://community.bistudio.com/wiki/emptyPositions","revid":378582,"updated":"2026-05-11T11:45:50Z","groups":["Object Manipulation","Unit Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the number of given empty positions in the vehicle.\n\n> [!NOTE]\n> To return the actual units in the vehicle use fullCrew. However if only the number is desired, use emptyPositions because it is faster.","syntaxes":[{"syntax":"vehicle emptyPositions position","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"transport","types":["Object"],"since":null,"text":"vehicle: Object - transport"},{"name":"position","type":"String","optional":false,"default":null,"description":"can be one of:\n- `\"Commander\"`\n- `\"Driver\"`\n- `\"Gunner\"`\n- `\"Cargo\"` - all cargo positions, FFV or not\n- Arma 3 v2.10 `\"\"` - all empty positions\n- Arma 3 v2.10 `\"CargoNoFFV\"` - non-FFV cargo\n- Arma 3 v2.10 `\"CargoFFV\"` - FFV cargo\n- Arma 3 v2.14 `\"Turret\"` - empty turrets (no FFV turrets, they are included in \"CargoFFV\")","types":["String"],"since":null,"text":"position: String - can be one of:\n- `\"Commander\"`\n- `\"Driver\"`\n- `\"Gunner\"`\n- `\"Cargo\"` - all cargo positions, FFV or not\n- Arma 3 v2.10 `\"\"` - all empty positions\n- Arma 3 v2.10 `\"CargoNoFFV\"` - non-FFV cargo\n- Arma 3 v2.10 `\"CargoFFV\"` - FFV cargo\n- Arma 3 v2.14 `\"Turret\"` - empty turrets (no FFV turrets, they are included in \"CargoFFV\")"}],"returns":{"type":"Number","types":["Number"],"description":"the number of available positions ignoring locked positions","text":"Number - the number of available positions ignoring locked positions"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"position","types":["String"]}},{"syntax":"vehicle emptyPositions [position, ignoreLocked]","since":"arma3 2.22","effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"transport","types":["Object"],"since":null,"text":"vehicle: Object - transport"},{"name":"position","type":"String","optional":false,"default":null,"description":"see moveInAny. Empty string \"\" returns number of all free positions","types":["String"],"since":null,"text":"position: String - see moveInAny. Empty string \"\" returns number of all free positions"},{"name":"ignoreLocked (Optional)","type":"Boolean","optional":false,"default":null,"description":"true to ignore locked positions. Default: false","types":["Boolean"],"since":null,"text":"ignoreLocked (Optional): Boolean - true to ignore locked positions. Default: false"}],"returns":{"type":"Number","types":["Number"],"description":"the number of available positions ignoring locked positions","text":"Number - the number of available positions ignoring locked positions"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"[position, ignoreLocked]","types":["Array"]}}],"examples":[{"text":"```sqf\n_freeCargoAndFFVPositions = vehicle player emptyPositions \"Cargo\";\n```","code":["_freeCargoAndFFVPositions = vehicle player emptyPositions \"Cargo\";"]},{"text":"```sqf\n_freeCargoOnlyPositions = vehicle player emptyPositions \"CargoNoFFV\";\n```","code":["_freeCargoOnlyPositions = vehicle player emptyPositions \"CargoNoFFV\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["moveInDriver","moveInTurret","moveInCommander","moveInGunner","moveInCargo","getCargoIndex","moveInAny"],"notes":[{"user":"DreadedEntity","date":"2022-03-20T00:08:54Z","text":"**emptyPositions** combines both turret and cargo in its output. If you must know the true count of either, you will have to use fullCrew (tested on several vehicles)\n\nI have not found a way to test for copilot in helicopters"}],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Command Group: Unit Control","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}