{"name":"local","title":"local","type":"command","url":"https://community.bistudio.com/wiki/local","revid":379296,"updated":"2026-10-30T23:47:38Z","groups":["Multiplayer"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check if given unit is local on the computer in multiplayer games - see Multiplayer Scripting - Locality.\nThis can be used to determine on which computer some code must be run. In single player all objects are local.","syntaxes":[{"syntax":"local object","params":[{"name":"object","type":"Object or Arma 3 v1.32 Group","type_expr":"Object | Group"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}},{"syntax":"local variable = value","note":"**From Arma 2 v1.00 until Arma 3 v1.54** - see **private** for later versions","since":"arma2 1.00","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"variable = value"}}],"examples":[{"text":"```sqf\nif (not local _unit) then\n{\n    hint format [\"%1 is remote\", name _unit];\n};\n```","code":["if (not local _unit) then\n{\n\thint format [\"%1 is remote\", name _unit];\n};"]},{"code":["_isLocalGroup = local group _unit;"]},{"text":"Sets variable's scope:\n\n```sqf\n// from Arma 2 v1.00 until Arma 3v1.54\nlocal _myVariable = 42;\n\n// since Arma 3 v1.54\nprivate _myVariable = 42;\n```","code":["// from Arma 2 v1.00 until Arma 3v1.54\nlocal _myVariable = 42;\n\n// since Arma 3 v1.54\nprivate _myVariable = 42;"]}],"multiplayer":"A few things to note amongst others:\n\n- A game logic / module is always local to the server\n- Terrain objects are local to every machine","see_also":["Arma 3: Event Handlers","owner","setOwner"]}