{"name":"BIS_fnc_locations","operator":null,"title":"BIS fnc locations","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_locations","revid":348808,"updated":"2023-11-08T14:38:16Z","groups":["Systems"],"status":"ok","replaced_by":[],"games":[{"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":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Creates or registers location logics (used in various modules, like Ambient Civilians, Ambient Civilian Vehicles or Warfare 2).\n\nUpon registering, function will set following variables into location logic's variable space:\n- \"class\" - unique class of location (either `BIS_loc_<configname>` or `BIS_loc_custom_<ID>`)\n- \"name\" - name of location from config or setName command. If none is defined, class is used\n- \"type\" - config type\n- \"neighbors\" - config defined neighbor locations\n\nIf you are registering currently existing object and some of variables above is already stored in it, it will **not** be replaced.","syntaxes":[{"syntax":"[types, area, debug] call BIS_fnc_locations","since":null,"effect":null,"exec":null,"params":[{"name":"types","type":"String or Array of Strings","optional":false,"default":null,"description":null,"types":["String","Array"],"since":null,"text":"types: String or Array of Strings"},{"name":"area","type":"Array in format [center, distance]","optional":false,"default":null,"description":null,"types":["Array"],"since":null,"text":"area: Array in format [center, distance]"},{"name":"debug","type":"Boolean","optional":true,"default":null,"description":null,"types":["Boolean"],"since":null,"text":"debug: Boolean (Optional)"}],"returns":{"type":"Array","types":["Array"],"description":"list of registered locations","text":"Array - list of registered locations"}},{"syntax":"[objects] call BIS_fnc_locations","since":null,"effect":null,"exec":null,"params":[{"name":"objects","type":"Array of Objects or Locations","optional":false,"default":null,"description":"list of specific locations to be registered","types":["Object","Location"],"since":null,"text":"objects: Array of Objects or Locations - list of specific locations to be registered"}],"returns":{"type":"Array","types":["Array"],"description":"list of registered locations","text":"Array - list of registered locations"}}],"examples":[{"text":"```sqf\n[\"CityCenter\", [getPosATL player, 1000]] call BIS_fnc_locations;\n```","code":["[\"CityCenter\", [getPosATL player, 1000]] call BIS_fnc_locations;"]},{"text":"```sqf\n[[\"acityc_dolina\"]] call BIS_fnc_locations;\n```","code":["[[\"acityc_dolina\"]] call BIS_fnc_locations;"]},{"text":"```sqf\n[[myLocation1, myLocation2], [], true] call BIS_fnc_locations;\n```","code":["[[myLocation1, myLocation2], [], true] call BIS_fnc_locations;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Functions Library"],"notes":[{"user":"Str","date":"2009-05-31T15:15:00Z","text":"You can also use `\"\" call BIS_fnc_locations` for quick debug of all locations on landscape"}],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Systems","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}