Military Symbols: Difference between revisions
Category: ArmA 2: Editor Modules
No edit summary  | 
				No edit summary  | 
				||
| Line 9: | Line 9: | ||
Data: <code>ca\modules\Marta</code>  | Data: <code>ca\modules\Marta</code>  | ||
===   | === Optional parameters ===  | ||
====Set variables to BIS_marta_mainscope with desired values====  | |||
[[  | *'''rules = <array>;''' - custom settings which defines how will be each side/faction shown. Array contains of array in format [<prefix>,<markercolor>]. Prefix is one of NATO marker prefixes ("b_" for BLUFOR,"o_" for OPFOR or "n_" for NEUTRAL) and markercolor is color of marker from CfgMarkerColors. If number of array items is 4, it's applied to sides. Otherwise it's applied to factions.  | ||
::Example: <pre>BIS_marta_mainscope setvariable ["rules",[["o_","colorred"],["b_","colorgreen"],["n_","colorgreen"],["n_","coloryellow"]]];</pre>  | |||
::Default value: [["o_","colorred"],["b_","colorgreen"],["n_","colorgreen"],["n_","coloryellow"]]  | |||
[[  | *'''delay = <number>;''' - Refresh delay in seconds  | ||
::Example: <pre>BIS_marta_mainscope setvariable ["delay",0.1];</pre>  | |||
::Default value:  0.5  | |||
<!--  | |||
*'''step = <number>;''' - Time in which are all markers refreshed (0 will halt program until all markers are refreshed, which can cause lag when number of groups is large).  | |||
::Example: <pre>BIS_marta_mainscope setvariable ["step",1];</pre>  | |||
::Default value:  0.5  | |||
-->  | |||
*'''duration = <number>;''' - duration defines how long will be markers shown after group get out from detection area (destroyed groups will have 1/10 of this duration)  | |||
::Example: <pre>BIS_marta_mainscope setvariable ["duration",600];</pre>  | |||
::Default value: 300 (=5 minutes)  | |||
===   | *'''minSize = <number>;''' - Minimal size of group which is requested to draw a marker.  | ||
<  | ::Example: <pre>BIS_marta_mainscope setvariable ["minSize",3];</pre>  | ||
* "  | ::Default value: 1  | ||
<!--  | |||
*'''offset = <number>;''' - defines how inaccurate will be enemy marker position. Value is maximal possible distance in metres.  | |||
::Example: <pre>BIS_marta_mainscope setvariable ["offset",100];</pre>  | |||
::Default:  50  | |||
-->  | |||
*'''WPgroups = <array>;''' - Set which groups will have displayed waypoints.  | |||
::Example: <pre>BIS_marta_mainscope setvariable ["WPgroups",[group soldier1, group player]];</pre>  | |||
::Default value:  empty array  | |||
====Set variables to group with desired values====  | |||
*'''MARTA_customIcon = <string>;''' - Define custom marker class for given group  | |||
::Example: <pre>(group player) setvariable ["MARTA_customIcon","b_recon"];</pre>  | |||
*'''MARTA_alwaysShow = <boolean>;''' - true if group will be visible no matter of it was already spotted  | |||
::Example: <pre>(group ruOfficer) setvariable ["MARTA_alwaysShow",true];</pre>  | |||
*'''MARTA_WP_isText = <boolean>;''' - true if waypoints numbers are to be displayed  | |||
::Example: <pre>(group ruOfficer) setvariable ["MARTA_WP_isText",true];</pre>  | |||
====Set variables to unit with desired values====  | |||
*'''MARTA_showRules = <array>;''' - Custom show rules of specific unit for given faction (1 is always show, 0 means automatic detection when spotted, -1 is never show).  | |||
::Example: <pre>player setvariable ["MARTA_showRules",["USMC",1,"CDF",0]];</pre>  | |||
*'''MARTA_reveal = <array>;''' - Groups which will be always visible for given unit.  | |||
::Example: <pre>player setvariable ["MARTA_reveal",[group ruTarget]];</pre>  | |||
*'''MARTA_hide = <array>;''' - Groups which will be always hidden for given unit.  | |||
::Example: <pre>player setvariable ["MARTA_hide",[group usmcPatrol]];</pre>  | |||
== Functions ==  | |||
<span style="color:red;">'''Functions can't be called in init field of units or init.sqf script. Use some delay before you use them'''</span>  | |||
=== Get visible groups ===  | |||
 [<position, radius>] call BIS_Marta_getVisibleGroups  | |||
*<position, radius> - none (using whole map data) or both arguments  | |||
*Returned value: list of groups that have visible NATO marker (in given circle)  | |||
*Returned value: Group - marker associated with group  | |||
<!--  | |||
=== Find group by marker ===  | |||
 ["GROUP",<marker>] call BIS_Marta_getParams  | |||
*<marker> - one of "BIS_Marta_#" markers  | |||
*Returned value: Group - marker associated with group  | |||
=== Find marker by group ===  | |||
 ["MARKER",<group>] call BIS_Marta_getParams  | |||
*<marker> - group  | |||
*Returned value: String - group associated with marker  | |||
=== Get list of all markers ===  | |||
 ["MARKERS"] call BIS_Marta_getParams  | |||
*Returned value: Array containing all Marta markers  | |||
=== Add zone with forced detection ===  | |||
 ["ADD",<zone>,<factions>,<types>] call BIS_Marta_zone  | |||
*<zone> - Array or Object - can be array with [center,radius] or trigger  | |||
*<factions> - Array - array of sides or factions which will have zone available (can contain both, e.g. [resistance,"INS"])  | |||
*<types> - Array - Optional param - Filter witch defines what unit classes and subclasses will be detected in zone.  | |||
*Returned value: ID used for deleting zone  | |||
=== Remove zone with forced detection ===  | |||
 ["REMOVE",<id>] call BIS_Marta_zone  | |||
*<id> - Number - ID of zone  | |||
*Returned value: True  | |||
=== Check if some unit is in zone ===  | |||
 ["CHECK",<unit>] call BIS_Marta_zone  | |||
*<unit> - Object or Group - Checked unit  | |||
*Returned value: Boolean (true if unit is in one of zones)  | |||
-->  | |||
== Marker list ==  | |||
[[Image:APP-6.jpg|right|]]  | |||
icon name consists of '''prefix''' and '''name'''. Prefix is used to define side and can be one of followings:  | |||
 b_  ... BLUFOR  | |||
 o_  ... OPFOR  | |||
 n_  ... Neutral  | |||
Name defines purpose of the icon. See picture on the right or code below to get visual list of icons:  | |||
 --- Currently used ---  | |||
 inf - Infantry  | |||
 motor - Motorized infantry  | |||
 mech - Mechanized infantry  | |||
 armor - Armored platoon  | |||
 air - Rotary wing aircraft  | |||
 maint - Maintanance group  | |||
 hq - Headquarters  | |||
 supply - Supply convoy  | |||
 plane - Fixed wing aircraft  | |||
 art - Artillery  | |||
 mortar - Mortar  | |||
 med - Medical  | |||
 recon - Reconnaisance team  | |||
 uav - Unmanned Aerial Vehicle  | |||
 empty - Unknown  | |||
For example, to set icon of enemy artillery, use prefix ''o_'' and type ''art'' to get ''o_art'' icon type.  | |||
Icons are defined in ''cfgGroupIcons'' section.  | |||
Revision as of 12:17, 1 January 2010
With Military Symbols it's possible to display units' military symbol in real time either in-game (above units), on map or both.
Initialization
Paths
Editor: Modules (F7) > Military Symbols
Data: ca\modules\Marta
Optional parameters
Set variables to BIS_marta_mainscope with desired values
- rules = <array>; - custom settings which defines how will be each side/faction shown. Array contains of array in format [<prefix>,<markercolor>]. Prefix is one of NATO marker prefixes ("b_" for BLUFOR,"o_" for OPFOR or "n_" for NEUTRAL) and markercolor is color of marker from CfgMarkerColors. If number of array items is 4, it's applied to sides. Otherwise it's applied to factions.
 
- Example: 
BIS_marta_mainscope setvariable ["rules",[["o_","colorred"],["b_","colorgreen"],["n_","colorgreen"],["n_","coloryellow"]]];
 - Default value: [["o_","colorred"],["b_","colorgreen"],["n_","colorgreen"],["n_","coloryellow"]]
 
- Example: 
 
- delay = <number>; - Refresh delay in seconds
 
- Example: 
BIS_marta_mainscope setvariable ["delay",0.1];
 - Default value: 0.5
 
- Example: 
 
- duration = <number>; - duration defines how long will be markers shown after group get out from detection area (destroyed groups will have 1/10 of this duration)
 
- Example: 
BIS_marta_mainscope setvariable ["duration",600];
 - Default value: 300 (=5 minutes)
 
- Example: 
 
- minSize = <number>; - Minimal size of group which is requested to draw a marker.
 
- Example: 
BIS_marta_mainscope setvariable ["minSize",3];
 - Default value: 1
 
- Example: 
 
- WPgroups = <array>; - Set which groups will have displayed waypoints.
 
- Example: 
BIS_marta_mainscope setvariable ["WPgroups",[group soldier1, group player]];
 - Default value: empty array
 
- Example: 
 
Set variables to group with desired values
- MARTA_customIcon = <string>; - Define custom marker class for given group
 
- Example: 
(group player) setvariable ["MARTA_customIcon","b_recon"];
 
- Example: 
 
- MARTA_alwaysShow = <boolean>; - true if group will be visible no matter of it was already spotted
 
- Example: 
(group ruOfficer) setvariable ["MARTA_alwaysShow",true];
 
- Example: 
 
- MARTA_WP_isText = <boolean>; - true if waypoints numbers are to be displayed
 
- Example: 
(group ruOfficer) setvariable ["MARTA_WP_isText",true];
 
- Example: 
 
Set variables to unit with desired values
- MARTA_showRules = <array>; - Custom show rules of specific unit for given faction (1 is always show, 0 means automatic detection when spotted, -1 is never show).
 
- Example: 
player setvariable ["MARTA_showRules",["USMC",1,"CDF",0]];
 
- Example: 
 
- MARTA_reveal = <array>; - Groups which will be always visible for given unit.
 
- Example: 
player setvariable ["MARTA_reveal",[group ruTarget]];
 
- Example: 
 
- MARTA_hide = <array>; - Groups which will be always hidden for given unit.
 
- Example: 
player setvariable ["MARTA_hide",[group usmcPatrol]];
 
- Example: 
 
Functions
Functions can't be called in init field of units or init.sqf script. Use some delay before you use them
Get visible groups
[<position, radius>] call BIS_Marta_getVisibleGroups
- <position, radius> - none (using whole map data) or both arguments
 - Returned value: list of groups that have visible NATO marker (in given circle)
 - Returned value: Group - marker associated with group
 
Marker list
icon name consists of prefix and name. Prefix is used to define side and can be one of followings:
b_ ... BLUFOR o_ ... OPFOR n_ ... Neutral
Name defines purpose of the icon. See picture on the right or code below to get visual list of icons:
--- Currently used --- inf - Infantry motor - Motorized infantry mech - Mechanized infantry armor - Armored platoon air - Rotary wing aircraft maint - Maintanance group hq - Headquarters supply - Supply convoy plane - Fixed wing aircraft art - Artillery mortar - Mortar med - Medical recon - Reconnaisance team uav - Unmanned Aerial Vehicle empty - Unknown
For example, to set icon of enemy artillery, use prefix o_ and type art to get o_art icon type.
Icons are defined in cfgGroupIcons section.
	