infoPanelComponentEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
No edit summary
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.72


|1.72|= Game version
|gr1= Custom Panels
____________________________________________________________________________________________


| Controls availability of component to given object info panel. |DESCRIPTION=
|descr= Controls availability of component to given object info panel.
____________________________________________________________________________________________


| unit [[infoPanelComponentEnabled]] [panelID, componentClassOrType] |SYNTAX=
|s1= unit [[infoPanelComponentEnabled]] [panelID, componentClassOrType]


|p1= unit: [[Object]] - the concerned vehicle |PARAMETER1=
|p1= unit: [[Object]] - the concerned vehicle


|p2= panelID: [[String]] - "left" or "right" can be used as panel names |PARAMETER2=
|p2= panelID: [[String]] - "left" or "right" can be used as panel names


|p3= componentClassOrType: [[String]] |PARAMETER3=
|p3= componentClassOrType: [[String]]


| [[Boolean]] - [[true]] if component was successfully enabled on the panel, [[false]] otherwise (e.g. component is not available for the object) |RETURNVALUE=
|r1= [[Boolean]] - [[true]] if component was successfully enabled on the panel, [[false]] otherwise (e.g. component is not available for the object)


|s2= [unit, turretPath] [[infoPanelComponentEnabled]] [panelID, componentClassOrType] |= Alternative Syntax
|s2= [unit, turretPath] [[infoPanelComponentEnabled]] [panelID, componentClassOrType]


|p21= unit: [[Object]] - the concerned vehicle |PARAMETER1=
|p21= unit: [[Object]] - the concerned vehicle


|p22= turretPath: [[Array]] - turret index |PARAMETER2=
|p22= turretPath: [[Array]] format [[Turret Path]] - turret index


|p23= panelID: [[String]] - "left" or "right" can be used as panel names |PARAMETER3=
|p23= panelID: [[String]] - "left" or "right" can be used as panel names


|p24= componentClassOrType: [[String]] |PARAMETER4=
|p24= componentClassOrType: [[String]]


|r2= [[Boolean]] |RETURNVALUE=
|r2= [[Boolean]]
____________________________________________________________________________________________


|x1= <code>{{codecomment|//returns true if specific component "SensorDisplay" is enabled on player vehicle's left panel}}
|x1= <sqf>
_state = <nowiki>[</nowiki>[[vehicle]] [[player]], [-1]] [[infoPanelComponentEnabled]] ["VehicleSystemsDisplayManagerComponentLeft", "SensorDisplay"];</code> |EXAMPLE1=
// returns true if specific component "SensorDisplay" is enabled on player vehicle's left panel
|x2= <code>{{codecomment|//returns true if all "SensorsDisplayComponent" components are enabled on player vehicle's left panel, otherwise returns false}}
_state = [vehicle player, [-1]] infoPanelComponentEnabled ["VehicleSystemsDisplayManagerComponentLeft", "SensorDisplay"];
_state = <nowiki>[</nowiki>[[vehicle]] [[player]], [-1]] [[infoPanelComponentEnabled]] ["VehicleSystemsDisplayManagerComponentLeft", "SensorsDisplayComponent"];</code> |EXAMPLE2=
</sqf>


| [[Arma 3 Custom Info]], [[infoPanel]], [[infoPanels]], [[setInfoPanel]], [[infoPanelComponents]], [[enableInfoPanelComponent]] |SEEALSO=
|x2= <sqf>
// returns true if all "SensorsDisplayComponent" components are enabled on player vehicle's left panel, otherwise returns false
_state = [vehicle player, [-1]] infoPanelComponentEnabled ["VehicleSystemsDisplayManagerComponentLeft", "SensorsDisplayComponent"];
</sqf>
 
|seealso= [[Arma 3: Custom Info]] [[infoPanel]] [[infoPanels]] [[setInfoPanel]] [[infoPanelComponents]] [[enableInfoPanelComponent]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Custom Panels]]

Latest revision as of 10:20, 16 June 2024

Hover & click on the images for description

Description

Description:
Controls availability of component to given object info panel.
Groups:
Custom Panels

Syntax

Syntax:
unit infoPanelComponentEnabled [panelID, componentClassOrType]
Parameters:
unit: Object - the concerned vehicle
panelID: String - "left" or "right" can be used as panel names
componentClassOrType: String
Return Value:
Boolean - true if component was successfully enabled on the panel, false otherwise (e.g. component is not available for the object)

Alternative Syntax

Syntax:
[unit, turretPath] infoPanelComponentEnabled [panelID, componentClassOrType]
Parameters:
unit: Object - the concerned vehicle
turretPath: Array format Turret Path - turret index
panelID: String - "left" or "right" can be used as panel names
componentClassOrType: String
Return Value:
Boolean

Examples

Example 1:
// returns true if specific component "SensorDisplay" is enabled on player vehicle's left panel _state = [vehicle player, [-1]] infoPanelComponentEnabled ["VehicleSystemsDisplayManagerComponentLeft", "SensorDisplay"];
Example 2:
// returns true if all "SensorsDisplayComponent" components are enabled on player vehicle's left panel, otherwise returns false _state = [vehicle player, [-1]] infoPanelComponentEnabled ["VehicleSystemsDisplayManagerComponentLeft", "SensorsDisplayComponent"];

Additional Information

See also:
Arma 3: Custom Info infoPanel infoPanels setInfoPanel infoPanelComponents enableInfoPanelComponent

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