{"name":"createVehicleLocal","operator":null,"title":"createVehicleLocal","type":"command","url":"https://community.bistudio.com/wiki/createVehicleLocal","revid":377538,"updated":"2026-01-02T06:54:18Z","groups":["Object Manipulation"],"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":"local","server_exec":false},"exec":null,"description":"Creates an object of the given type. The Created object is not transferred through network in MP games.\nnetId of such vehicle in multiplayer will be \"0:0\". To disable local vehicle creation, use CfgDisabledCommands to blacklist this command.\nAlternatively, you can use createSimpleObject with local option enabled where applicable.","syntaxes":[{"syntax":"type createVehicleLocal position","since":null,"effect":null,"exec":null,"params":[{"name":"type","type":"String","optional":false,"default":null,"description":"vehicle/object className","types":["String"],"since":null,"text":"type: String - vehicle/object className"},{"name":"position","type":"PositionAGL","optional":false,"default":null,"description":null,"types":["PositionAGL"],"since":null,"text":"position: PositionAGL"}],"returns":{"type":"Object","types":["Object"],"description":null,"text":"Object"},"form":"binary","operator":null,"left":{"text":"type","types":["String"]},"right":{"text":"position","types":["PositionAGL"]}},{"syntax":"createVehicleLocal [type, position, markers, placement, special]","since":"arma3 2.14","effect":null,"exec":null,"params":[{"name":"type","type":"String","optional":false,"default":null,"description":"vehicle/object className","types":["String"],"since":null,"text":"type: String - vehicle/object className"},{"name":"position","type":"Object, Position2D or PositionATL (PositionAGL if watercraft or amphibious)","optional":false,"default":null,"description":"desired placement position","types":["Object","Position2D","PositionATL","PositionAGL"],"since":null,"text":"position: Object, Position2D or PositionATL (PositionAGL if watercraft or amphibious) - desired placement position"},{"name":"markers","type":"Array of Strings","optional":true,"default":"`[]`","description":"if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate.","types":["Array","String"],"since":null,"text":"markers: Array of Strings - (Optional, default `[]`) if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate."},{"name":"placement","type":"Number","optional":true,"default":"0","description":"the vehicle is placed inside a circle with given position as center and placement as its radius.","types":["Number"],"since":null,"text":"placement: Number - (Optional, default 0) the vehicle is placed inside a circle with given position as center and placement as its radius."},{"name":"special","type":"String","optional":true,"default":"\"NONE\"","description":"can be one of the following:\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\nIf *special* is \"\" or not specified, default `\"NONE\"` is used.","types":["String"],"since":null,"text":"special: String - (Optional, default \"NONE\") can be one of the following:\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\nIf *special* is \"\" or not specified, default `\"NONE\"` is used."}],"returns":{"type":"Object","types":["Object"],"description":"created vehicle or objNull if failed","text":"Object - created vehicle or objNull if failed"},"form":"unary","operator":null,"left":null,"right":{"text":"[type, position, markers, placement, special]","types":["Array"]}}],"examples":[{"text":"```sqf\n_lightSource = \"#lightpoint\" createVehicleLocal _pos;\n```","code":["_lightSource = \"#lightpoint\" createVehicleLocal _pos;"]},{"text":"Multiple types:\n\n```sqf\nprivate _lightSource =        \"#lightsource\"        createVehicleLocal _pos;    // see [[Light Source Tutorial]]\nprivate _lightReflector =    \"#lightreflector\"    createVehicleLocal _pos;    // see [[Light Source Tutorial]] - since Arma 3 v2.06\nprivate _particleSource =    \"#particlesource\"    createVehicleLocal _pos;    // see [[Particles Tutorial]]\nprivate _dynamicSound =        \"#dynamicsound\"        createVehicleLocal _pos;    // see [[createSoundSource]]\n```","code":["private _lightSource =\t\t\"#lightsource\"\t\tcreateVehicleLocal _pos;\t// see [[Light Source Tutorial]]\nprivate _lightReflector =\t\"#lightreflector\"\tcreateVehicleLocal _pos;\t// see [[Light Source Tutorial]] - since Arma 3 v2.06\nprivate _particleSource =\t\"#particlesource\"\tcreateVehicleLocal _pos;\t// see [[Particles Tutorial]]\nprivate _dynamicSound =\t\t\"#dynamicsound\"\t\tcreateVehicleLocal _pos;\t// see [[createSoundSource]]"]},{"text":"```sqf\n// since Arma 3 v2.14\nprivate _lightPoint = createVehicleLocal [\"#lightpoint\", getMarkerPos \"marker1\", [\"marker2\", \"marker3\"], 0, \"NONE\"];\n```","code":["// since Arma 3 v2.14\nprivate _lightPoint = createVehicleLocal [\"#lightpoint\", getMarkerPos \"marker1\", [\"marker2\", \"marker3\"], 0, \"NONE\"];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["createVehicle","createMine","deleteVehicle","createUnit"],"notes":[{"user":"Kronzky","date":"2008-06-05T07:18:00Z","text":"If the object that is created is of the type ammo, then it will created on **all** clients (*tested only on VBS2*)."},{"user":"DamonDaemon","date":"2013-09-05T18:04:00Z","text":"Indeed the type of Ammo is transfered to **ALL** clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on ArmA - Arma 2:OA (latest patch)."},{"user":"demellion","date":"2018-11-02T12:16:00Z","text":"**WARNING:** Do not instigate createVehicle or createVehicleLocal within a server function executed with preInit flag.\n\nThis will cause *\"You cannot play/edit this mission\"* for a vehicles compiled from a -mod and make server skip/loop that mission init."}],"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","Introduced with Armed Assault version 1.00","Scripting Commands","Scripting Commands: Local Effect","Take On Helicopters: Scripting Commands"]}