BIS fnc locations: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)<nowiki>\[<\/nowiki>\[\[([a-zA-Z0-9_]+)\]\](.*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 22: | Line 22: | ||
Upon registering, function will set following variables into location logic's variable space: | Upon registering, function will set following variables into location logic's variable space: | ||
*"class" - unique class of location (either BIS_loc_<configname> or BIS_loc_custom_<ID>) | * "class" - unique class of location (either {{hl|BIS_loc_<configname>}} or {{hl|BIS_loc_custom_<ID>}}) | ||
*"name" - name of location from config or [[setName]] command. If none is defined, class is used | * "name" - name of location from config or [[setName]] command. If none is defined, class is used | ||
*"type" - config type | * "type" - config type | ||
*"neighbors" - config defined neighbor locations | * "neighbors" - config defined neighbor locations | ||
If you | If you are registering currently existing object and some of variables above is already stored in it, it will '''not''' be replaced. | ||
|s1= [ | |s1= [types, area, debug] call [[BIS_fnc_locations]] | ||
|p1= | |p1= types: [[String]] or [[Array]] of [[String]]s | ||
|p2= area: [[Array]] in format [center,distance] | |p2= area: [[Array]] in format [center, distance] | ||
|p3= debug | |p3= debug: [[Boolean]] (Optional) | ||
|r1= [[Array]] - | |r1= [[Array]] - list of registered locations | ||
|s2= [objects] call [[BIS_fnc_locations]] | |s2= [objects] call [[BIS_fnc_locations]] | ||
Line 43: | Line 43: | ||
|p21= objects: Array of [[Object]]s or [[Location]]s - list of specific locations to be registered | |p21= objects: Array of [[Object]]s or [[Location]]s - list of specific locations to be registered | ||
|r2= [[Array]] - List of registered locations | |r2= [[Array]] - List of registered locations | ||
|x1= < | |x1= <sqf>["CityCenter", [getPosATL player, 1000]] call BIS_fnc_locations;</sqf> | ||
|x2= < | |x2= <sqf>[["acityc_dolina"]] call BIS_fnc_locations;</sqf> | ||
|x3= < | |x3= <sqf>[[myLocation1, myLocation2], [], true] call BIS_fnc_locations;</sqf> | ||
|seealso= [[Functions Library]] | |seealso= [[Functions Library]] | ||
}} | }} | ||
{{Note | |||
|user= Str | |||
timestamp= 20090531151500 | |||
|text= You can also use <sqf inline>"" call BIS_fnc_locations</sqf> for quick debug of all locations on landscape | |||
}} | |||
Revision as of 13:28, 13 July 2022
Description
- Description:
- Creates or registers location logics (used in various modules, like Ambient Civilians, Ambient Civilian Vehicles or Warfare 2).
Upon registering, function will set following variables into location logic's variable space:
- "class" - unique class of location (either BIS_loc_<configname> or BIS_loc_custom_<ID>)
- "name" - name of location from config or setName command. If none is defined, class is used
- "type" - config type
- "neighbors" - config defined neighbor locations
- Execution:
- call
- Groups:
- Systems
Syntax
- Syntax:
- [types, area, debug] call BIS_fnc_locations
- Parameters:
- types: String or Array of Strings
- area: Array in format [center, distance]
- debug: Boolean (Optional)
- Return Value:
- Array - list of registered locations
Alternative Syntax
- Syntax:
- [objects] call BIS_fnc_locations
- Parameters:
- objects: Array of Objects or Locations - list of specific locations to be registered
- Return Value:
- Array - List of registered locations
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
- See also:
- Functions Library
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Date unknown
- You can also use "" call BIS_fnc_locations for quick debug of all locations on landscape