BIS fnc locations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 11: Line 11:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Créé ou enregistre des localisations logiques (utilisé dans certains modules, comme [[Ambient Civilians]], [[Ambient Civilian Vehicles]] ou Warfare 2).
| Creates or registers location logics (used in various modules, like [[Ambient Civilians]], [[Ambient Civilian Vehicles]] or Warfare 2).


Lors de l'enregistrement, la fonction sera mis sur les variables suivantes dans l'espace où se trouve la variable logique:
Upon registering, function will set following variables into location logic's variable space:
*"class" - classe unique du lieu (soit BIS_loc_<configname> ou BIS_loc_custom_<ID>)
*"class" - unique class of location (either BIS_loc_<configname> or 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.
*"name" - name of location from config or [[setName]] command. If none is defined, class is used
*"type" - config type
*"type" - config type
*"neighbors" - définition config pour les lieux voisins
*"neighbors" - config defined neighbor locations


Si vous enregistré un lieu avec une classe existante, le lieu ne sera '''PAS''' remplacé.
If you're registering currently existing object and some of variables above is already stored in it, it '''won't''' be replaced.
|=
|=
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 25: Line 25:
| [type(s),area,''debug''] call '''BIS_fnc_locations'''  |=
| [type(s),area,''debug''] call '''BIS_fnc_locations'''  |=


|p1= type(s): [[String]] ou [[Array]] de [[strings]] |= PARAMETER1  
|p1= type(s): [[String]] or [[Array]] of strings |= PARAMETER1  


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


|p3= debug: ''(Optional)'': [[Boolean]]|= PARAMETER3  
|p3= debug: ''(Optional)'': [[Boolean]]|= PARAMETER3  


| [[Array]] - Liste de lieux enregistrés<br /><br /> |= RETURNVALUE
| [[Array]] - List of registered locations<br /><br /> |= RETURNVALUE




|s2= [objects] call '''BIS_fnc_locations'''|= Alternative Syntax
|s2= [objects] call '''BIS_fnc_locations'''|= Alternative Syntax


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


|r2= [[Array]] - Listes des lieux enregistrés<br /><br /> |= Return value
|r2= [[Array]] - List of registered locations<br /><br /> |= Return value


   
   
Line 66: Line 66:
<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>


[[Category:ArmA 2: Functions|LOCATIONS}}]]
[[Category:Fonctions|LOCATIONS}}]]
[[Category:Command Group: Locations]]
[[Category:Command Group: Locations]]

Revision as of 15:54, 7 December 2010

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

Posted on May 31, 2009 - 15:15
Str
You can also use "" call bis_fnc_locations for quick debug of all locations on landscape

Bottom Section