BIS fnc locations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
No edit summary
Line 1: Line 1:
{{Command|=
____________________________________________________________________________________________
| ARMA2 |=
|1.00|=


{{Function|= Comments
|arg= |= MPARGUMENTS
 
|eff= |= MPEFFECTS
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| Creates or registers location logics (used in various modules, like [[Ambient Civilians]], [[Ambient Civilian Vehicles]] or Warfare 2).


|1.00|= Game version
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.
|=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| [type(s),area,''debug''] call '''BIS_fnc_locations'''  |=
/*
File: locations.sqf


Description:
|p1= type(s): [[String]] or [[Array]] of strings |= PARAMETER1
Creates location logics in the given area


Parameter(s):
|p2= area: [[Array]] in format [center,distance] |= PARAMETER2
_this select 0: String, Location, Object or Array - Location type(s), list of custom locations or list of logics
_this select 1: Object or Array - Checked area (trigger or array in format [center,distance])
_this select 2: Boolean - Debug mode


Returned value:
|p3= debug: ''(Optional)'': [[Boolean]]|= PARAMETER3
Array - list of all location logics in given area (both new and already created ones)
 
| [[Array]] - List of registered locations<br /><br /> |= RETURNVALUE
Note: If locations given by type (String) only config locations are used (not custom locations created via createLocation - because there is no way to get unique id/name for them). For script created locations - give list of them to this function.
 
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|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


| <!-- [] call [[BIS_fnc_locations]]; --> |= Syntax
|r2= [[Array]] - List of registered locations<br /><br /> |= Return value


|p1= |= Parameter 1
|x1= <code>["CityCenter",<nowiki>[</nowiki>[[position]] [[player]],1000]] call bis_fnc_locations;</code>|= EXAMPLE1


| |= Return value
|x2= <code><nowiki>[[</nowiki>"acityc_dolina"<nowiki>]]</nowiki> call bis_fnc_locations;</code>|= EXAMPLE2
____________________________________________________________________________________________


|x1= <code></code> |=  
|x3= <code><nowiki>[[</nowiki>myLocation1,myLocation2],[],true] call bis_fnc_locations;</code>|= EXAMPLE3
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[Functions Library]] |= SEEALSO


|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}


<h3 style="display:none">Notes</h3>
<h3 style='display:none'>Notes</h3>
<dl class="command_description">
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


Line 49: Line 61:
</dl>
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Function Group: Systems|{{uc:locations}}]]
 
[[Category:Functions|{{uc:locations}}]]
[[Category:ArmA 2: Functions|BIS_FNC_LOCATIONS}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:locations}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:locations}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:locations}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:locations}}]]

Revision as of 15:52, 31 May 2009

Hover & click on the images for description

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
If you're registering currently existing object and some of variables above is already stored in it, it won't be replaced.
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

Notes

Bottom Section