{"name":"createMine","title":"createMine","type":"command","url":"https://community.bistudio.com/wiki/createMine","revid":377391,"updated":"2026-01-02T06:44:33Z","groups":["Mines"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Creates a mine of the given type.\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>\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>\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]","params":[{"name":"type","type":"String","description":"mine class name from `CfgVehicles`","type_expr":"String"},{"name":"position","type":"Object or PositionAGL","type_expr":"Object | PositionAGL"},{"name":"markers","type":"Array of Strings","description":"marker name(s)","type_expr":"Array<String>"},{"name":"placement","type":"Number","description":"placement radius","type_expr":"Number"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"[type, position, markers, placement]"}}],"examples":[{"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;"]}],"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\n| Mines | Remote detonation charges |\n|---|---|\n| - `\"ATMine\"`<br>- `\"APERSMine\"`<br>- `\"APERSBoundingMine\"`<br>- `\"SLAMDirectionalMine\"`<br>- `\"APERSTripMine\"`<br>- `\"UnderwaterMine\"`<br>- `\"UnderwaterMineAB\"`<br>- `\"UnderwaterMinePDM\"` | - `\"SatchelCharge_F\"`<br>- `\"DemoCharge_F\"`<br>- `\"Claymore_F\"`<br>- `\"IEDUrbanBig_F\"`<br>- `\"IEDLandBig_F\"`<br>- `\"IEDUrbanSmall_F\"`<br>- `\"IEDLandSmall_F\"` |"}]}