{"name":"createMine","operator":null,"title":"createMine","type":"command","url":"https://community.bistudio.com/wiki/createMine","revid":377391,"updated":"2026-01-02T06:44:33Z","groups":["Mines"],"status":"ok","replaced_by":[],"games":[{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"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":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Creates a mine of the given type.\n\nIf the *markers* array only contains one marker name, it is ignored and the *position* parameter is used instead.\nIf *markers* contains multiple marker names, one of them is chosen randomly and used as the center of the placement area.\n\nThis command creates objects of the `CfgAmmo` class named in `configFile >> \"CfgVehicles\" >> _type >> \"ammo\"`.\n\n> [!NOTE]\n> Unit ability to detect mines depends on many factors:\n> The starting value is defined in config, for example `./CfgVehicles/B_soldier_F/detectSkill`, which in this case is 12.\n> Mine specialist value for example, defined in `./CfgVehicles/B_soldier_exp_F/detectSkill` is 38.\n> This value is then dynamically reduced depending on factors such as distance, if a unit is in a vehicle, if it is day or night time, how directly unit is looking at the mine, how fast unit is moving, how inconspicuous is the mine or even if it is visible.","syntaxes":[{"syntax":"createMine [type, position, markers, placement]","since":null,"effect":null,"exec":null,"params":[{"name":"type","type":"String","optional":false,"default":null,"description":"mine class name from `CfgVehicles`","types":["String"],"since":null,"text":"type: String - mine class name from `CfgVehicles`"},{"name":"position","type":"Object or PositionAGL","optional":false,"default":null,"description":null,"types":["Object","PositionAGL"],"since":null,"text":"position: Object or PositionAGL"},{"name":"markers","type":"Array of Strings","optional":false,"default":null,"description":"marker name(s)","types":["Array","String"],"since":null,"text":"markers: Array of Strings - marker name(s)"},{"name":"placement","type":"Number","optional":false,"default":null,"description":"placement radius","types":["Number"],"since":null,"text":"placement: Number - placement radius"}],"returns":{"type":"Object","types":["Object"],"description":null,"text":"Object"},"form":"unary","operator":null,"left":null,"right":{"text":"[type, position, markers, placement]","types":["Array"]}}],"examples":[{"text":"```sqf\n_mine = createMine [\"APERSMine\", ASLToAGL getPosASL player, [], 3];\n```","code":["_mine = createMine [\"APERSMine\", ASLToAGL getPosASL player, [], 3];"]},{"text":"Create a satchel charge and give the player control over it:\n\n```sqf\n_charge = createMine [\"SatchelCharge_F\", player, [], 0];\nplayer addOwnedMine _charge;\n```","code":["_charge = createMine [\"SatchelCharge_F\", player, [], 0];\nplayer addOwnedMine _charge;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["allMines","detectedMines","mineDetectedBy","mineActive","revealMine","getAllOwnedMines","addOwnedMine","removeOwnedMine","removeAllOwnedMines"],"notes":[{"user":"Tankbuster","date":"2017-06-05T22:43:00Z","text":"Note that this command uses AGL (very similar to ASL) positions, so if you want to use the moored or seabed mine, you'll have to find the appropriate negative z value that is underwater and convert that to ASL.\nAlso note that you can't adjust the positions of sea mines after they've been created. The command is either ignored or not propagated across the network to clients."},{"user":"Killzone_Kid","date":"2019-09-25T03:28:00Z","text":"The following explosives used in Arma 3 can be created with this command:\n{| class=\"wikitable\"\n! Mines\n! Remote detonation charges\n|- style=\"vertical-align: top\"\n|\n- `\"ATMine\"`\n- `\"APERSMine\"`\n- `\"APERSBoundingMine\"`\n- `\"SLAMDirectionalMine\"`\n- `\"APERSTripMine\"`\n- `\"UnderwaterMine\"`\n- `\"UnderwaterMineAB\"`\n- `\"UnderwaterMinePDM\"`\n|\n- `\"SatchelCharge_F\"`\n- `\"DemoCharge_F\"`\n- `\"Claymore_F\"`\n- `\"IEDUrbanBig_F\"`\n- `\"IEDLandBig_F\"`\n- `\"IEDUrbanSmall_F\"`\n- `\"IEDLandSmall_F\"`"}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Mines","Introduced with Operation Flashpoint: Elite version 1.00","Operation Flashpoint: Elite: New Scripting Commands","Operation Flashpoint: Elite: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}