{"name":"BIS_fnc_spawnObjects","title":"BIS fnc spawnObjects","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_spawnObjects","revid":378126,"updated":"2026-02-21T14:35:37Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Create a stack of objects at given position or on top of given object (eg. table).","syntaxes":[{"syntax":"[position, className, count, offsetMatrix, offsetDir, dirNoise, enableSimulation] call BIS_fnc_spawnObjects","params":[{"name":"position","type":"Array format PositionASL, or Array as [referenceObject, placement]","description":"Array format PositionASL, or Array as [referenceObject, placement]\n\n- referenceObject: Object\n- placement: String - can be:\n  - \"BOTTOM\" = at the bottom of the object\n  - \"TOP\" = top of the objects boundingbox\n  - \"GROUND\" = sitting just on the ground\n  - \"ROADWAY\" = sitting just on the ground","type_expr":"PositionASL | Array","types":["Array","PositionASL"],"text":"position: Array format PositionASL, or Array as [referenceObject, placement]\n\n- referenceObject: Object\n- placement: String - can be:\n  - \"BOTTOM\" = at the bottom of the object\n  - \"TOP\" = top of the objects boundingbox\n  - \"GROUND\" = sitting just on the ground\n  - \"ROADWAY\" = sitting just on the ground"},{"name":"className","type":"String","description":"class of the object(s) to spawn; all will use the same class","type_expr":"String"},{"name":"count","type":"Number","optional":true,"default":"1","description":"how many objects will be spawned","type_expr":"Number","text":"count: Number - (Optional, default: 1) how many objects will be spawned"},{"name":"offsetMatrix","type":"Array","optional":true,"default":"[0, 0, 0]","description":"starting spawning position offset","type_expr":"Array","text":"offsetMatrix: Array - (Optional, default: [0, 0, 0]) starting spawning position offset"},{"name":"offsetDir","type":"Number","optional":true,"default":"0","description":"starting spawning direction offset","type_expr":"Number","text":"offsetDir: Number - (Optional, default: 0) starting spawning direction offset"},{"name":"dirNoise","type":"Code","optional":true,"default":"{ 0 }","description":"spawned object direction delta from the starting direction, defined as code returning dir delta value","type_expr":"Code","text":"dirNoise: Code - (Optional, default: { 0 }) spawned object direction delta from the starting direction, defined as code returning dir delta value"},{"name":"enableSimulation","type":"Boolean","optional":true,"default":"false","description":"shall the simulation of the spawned objects be enabled or not","type_expr":"Boolean","text":"enableSimulation: Boolean - (Optional, default: false) shall the simulation of the spawned objects be enabled or not"}],"returns":{"type":"Array of created Objects","type_expr":"Array"}}],"examples":[{"code":["private _randomPos = [(random 0.2) -0.1, (random 0.2) -0.1, 0];\n_objects = [[_table, \"TOP\"], \"Box_NATO_Wps_F\", 3, _randomPos, (random 20) - 10] call BIS_fnc_spawnObjects;"]}],"see_also":["createVehicle","createSimpleObject","enableSimulation"]}