BIS fnc locations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *L([a-z ])" to "$1 - l$2")
 
(55 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=function
____________________________________________________________________________________________


| arma2 |=
|game1= arma2
|version1= 1.00


|1.00|=
|game2= arma2oa
|version2= 1.50


|arg= |= MPARGUMENTS
|game3= tkoh
|version3= 1.00


|eff= |= MPEFFECTS
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Créé ou enregistre des localisations logiques (utilisé dans certains modules, comme [[Ambient Civilians]], [[Ambient Civilian Vehicles]] ou Warfare 2).
|gr1= Systems


Lors de l'enregistrement, la fonction sera mis sur les variables suivantes dans l'espace où se trouve la variable logique:
|arg=
*"class" - classe unique du lieu (soit BIS_loc_<configname> ou BIS_loc_custom_<ID>)
*"name" - nom du lieu depuis le config ou la commande [[setName]]. Si rien n'est défini, la classe sera utilisée.
*"type" - config type
*"neighbors" - définition config pour les lieux voisins


Si vous enregistré un lieu avec une classe existante, le lieu ne sera '''PAS''' remplacé.
|eff=
|=
____________________________________________________________________________________________


| [type(s),area,''debug''] call '''BIS_fnc_locations'''  |=
|descr= Creates or registers location logics (used in various modules, like [[Ambient Civilians]], [[Ambient Civilian Vehicles]] or Warfare 2).


|p1= type(s): [[String]] ou [[Array]] de [[strings]] |= PARAMETER1
Upon registering, function will set following variables into location logic's variable space:
* "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
* "type" - config type
* "neighbors" - config defined neighbor locations


|p2= area: [[Array]] au format [center,distance] |= PARAMETER2
If you are registering currently existing object and some of variables above is already stored in it, it will '''not''' be replaced.


|p3= debug: ''(Optional)'': [[Boolean]]|= PARAMETER3
|s1= [types, area, debug] call [[BIS_fnc_locations]]


| [[Array]] - Liste de lieux enregistrés<br /><br /> |= RETURNVALUE
|p1= types: [[String]] or [[Array]] of [[String]]s


|p2= area: [[Array]] in format [center, distance]


|s2= [objects] call '''BIS_fnc_locations'''|= Alternative Syntax
|p3= debug: [[Boolean]] (Optional)


|p21= objects: Array of [[Object]]s or [[Location]]s - Liste des lieux spécifiques à enregistrer |= Parameter 1
|r1= [[Array]] - list of registered locations


|r2= [[Array]] - Listes des lieux enregistrés<br /><br /> |= Return value
|s2= [objects] call [[BIS_fnc_locations]]


|p21= objects: Array of [[Object]]s or [[Location]]s - list of specific locations to be registered
|r2= [[Array]] - list of registered locations
   
   
|x1= <code>["CityCenter",<nowiki>[</nowiki>[[position]] [[player]],1000]] call bis_fnc_locations;</code>|= EXAMPLE1
|x1= <sqf>["CityCenter", [getPosATL player, 1000]] call BIS_fnc_locations;</sqf>


|x2= <code><nowiki>[[</nowiki>"acityc_dolina"<nowiki>]]</nowiki> call bis_fnc_locations;</code>|= EXAMPLE2
|x2= <sqf>[["acityc_dolina"]] call BIS_fnc_locations;</sqf>


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


| [[Functions Library]] |= SEEALSO
|seealso= [[Functions Library]]
}}


| |= MPBEHAVIOUR
{{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
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on May 31, 2009 - 15:15</dd>
<dt class="note">'''[[User:Str|Str]]'''</dt><dd class="note">You can also use '''"" call bis_fnc_locations''' for quick debug of all locations on landscape</dd>
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: Functions|LOCATIONS}}]]
[[Category:Command Group: Locations]]

Latest revision as of 15:38, 8 November 2023

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 are registering currently existing object and some of variables above is already stored in it, it will not be replaced.
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:
["CityCenter", [getPosATL 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
Str - c
Posted on May 31, 2009 - 15:15 (UTC)
You can also use "" call BIS_fnc_locations for quick debug of all locations on landscape