BIS fnc locations: Difference between revisions
Jump to navigation
Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Command|= | |||
____________________________________________________________________________________________ | |||
| ARMA2 |= | |||
|1.00|= | |||
|arg= |= MPARGUMENTS | |||
|eff= |= MPEFFECTS | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | 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 | |||
If you're registering currently existing object and some of variables above is already stored in it, it '''won't''' be replaced. | |||
|= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [type(s),area,''debug''] call '''BIS_fnc_locations''' |= | ||
|p1= type(s): [[String]] or [[Array]] of strings |= PARAMETER1 | |||
|p2= area: [[Array]] in format [center,distance] |= PARAMETER2 | |||
|p3= debug: ''(Optional)'': [[Boolean]]|= PARAMETER3 | |||
| [[Array]] - List of registered locations<br /><br /> |= RETURNVALUE | |||
</ | |s2= [objects] call '''BIS_fnc_locations'''|= Alternative Syntax | ||
|p21= objects: Array of [[Object]]s or [[Location]]s - list of specific locations to be registered |= Parameter 1 | |||
| | |r2= [[Array]] - List of registered locations<br /><br /> |= Return value | ||
| | |||
|x1= <code>["CityCenter",<nowiki>[</nowiki>[[position]] [[player]],1000]] call bis_fnc_locations;</code>|= EXAMPLE1 | |||
| |= | |x2= <code><nowiki>[[</nowiki>"acityc_dolina"<nowiki>]]</nowiki> call bis_fnc_locations;</code>|= EXAMPLE2 | ||
| | |x3= <code><nowiki>[[</nowiki>myLocation1,myLocation2],[],true] call bis_fnc_locations;</code>|= EXAMPLE3 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= | | [[Functions Library]] |= SEEALSO | ||
| |= MPBEHAVIOUR | |||
____________________________________________________________________________________________ | |||
}} | }} | ||
<h3 style= | <h3 style='display:none'>Notes</h3> | ||
<dl class= | <dl class='command_description'> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
Line 49: | Line 61: | ||
</dl> | </dl> | ||
<h3 style= | <h3 style='display:none'>Bottom Section</h3> | ||
[[Category:ArmA 2: Functions|BIS_FNC_LOCATIONS}}]] | |||
[[Category: | |||
Revision as of 14:52, 31 May 2009
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
- Groups:
- Uncategorised
Syntax
- Syntax:
- [type(s),area,debug] call BIS_fnc_locations
- Parameters:
- type(s): String or Array of strings
- area: Array in format [center,distance]
- debug: (Optional): Boolean
- 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:
["CityCenter",[position player,1000]] call bis_fnc_locations;
- Example 2:
[["acityc_dolina"]] call bis_fnc_locations;
- Example 3:
[[myLocation1,myLocation2],[],true] call bis_fnc_locations;
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