setUserMFDValue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game name=
| arma3


|1.70|Game version=
|1.70


|gr1= Interaction |GROUP1=
|gr1= Interaction


| When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry
| When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry
Line 16: Line 16:
...
...
</syntaxhighlight>
</syntaxhighlight>
which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD |DESCRIPTION=
which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD


| vehicle '''setUserMFDValue''' [index, value]|SYNTAX=
| vehicle '''setUserMFDValue''' [index, value]


|p1= vehicle: [[Object]] - an vehicle with MFD |PARAMETER1=
|p1= vehicle: [[Object]] - an vehicle with MFD


|p2= index: [[Number]] - index of custom MFD user actions |PARAMETER2=
|p2= index: [[Number]] - index of custom MFD user actions


|p3= value: [[Number]] - value which should custom source return in MFD |PARAMETER3=
|p3= value: [[Number]] - value which should custom source return in MFD


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]
   
   
|x1= <code> BIS_Plane [[setUserMFDValue]] [0,1]; // user0 in MFD will return 1</code> |EXAMPLE1=
|x1= <code> BIS_Plane [[setUserMFDValue]] [0,1]; // user0 in MFD will return 1</code>


|x2= Set MFD Red:<code>Blackfoot [[setUserMFDValue]] [0, 1]; // "user0" - 1
|x2= Set MFD Red:<code>Blackfoot [[setUserMFDValue]] [0, 1]; // "user0" - 1
Blackfoot [[setUserMFDValue]] [1, 0]; // "user1" - 0
Blackfoot [[setUserMFDValue]] [1, 0]; // "user1" - 0
Blackfoot [[setUserMFDValue]] [2, 0]; // "user2" - 0
Blackfoot [[setUserMFDValue]] [2, 0]; // "user2" - 0
Blackfoot [[setUserMFDValue]] [3, 1]; // "user3" - 1</code> |EXAMPLE2=
Blackfoot [[setUserMFDValue]] [3, 1]; // "user3" - 1</code>


|x3= Set MFD pale Blue:<code>Blackfoot [[setUserMFDValue]] [0, 0]; // "user0" - 0
|x3= Set MFD pale Blue:<code>Blackfoot [[setUserMFDValue]] [0, 0]; // "user0" - 0
Blackfoot [[setUserMFDValue]] [1, 0]; // "user1" - 0
Blackfoot [[setUserMFDValue]] [1, 0]; // "user1" - 0
Blackfoot [[setUserMFDValue]] [2, 1]; // "user2" - 1
Blackfoot [[setUserMFDValue]] [2, 1]; // "user2" - 1
Blackfoot [[setUserMFDValue]] [3, 0.1]; // "user3" - 0.1</code> |EXAMPLE3=
Blackfoot [[setUserMFDValue]] [3, 0.1]; // "user3" - 0.1</code>


|x4= Hide MFD:<code>Blackfoot [[setUserMFDValue]] [3, 0]; // "user3" - 0</code> |EXAMPLE4=
|x4= Hide MFD:<code>Blackfoot [[setUserMFDValue]] [3, 0]; // "user3" - 0</code>


| [[getUserMFDValue]], [[setUserMFDText]], [[getUserMFDText]]|SEEALSO=
| [[getUserMFDValue]], [[setUserMFDText]], [[getUserMFDText]]


}}
}}

Revision as of 12:08, 18 January 2021

Hover & click on the images for description

Description

Description:
When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry
...
class Draw
{
	alpha = "user3";
	color[] = {"user0","user1","user2"};
...
which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD
Groups:
Interaction

Syntax

Syntax:
vehicle setUserMFDValue [index, value]
Parameters:
vehicle: Object - an vehicle with MFD
index: Number - index of custom MFD user actions
value: Number - value which should custom source return in MFD
Return Value:
Nothing

Examples

Example 1:
BIS_Plane setUserMFDValue [0,1]; // user0 in MFD will return 1
Example 2:
Set MFD Red:Blackfoot setUserMFDValue [0, 1]; // "user0" - 1 Blackfoot setUserMFDValue [1, 0]; // "user1" - 0 Blackfoot setUserMFDValue [2, 0]; // "user2" - 0 Blackfoot setUserMFDValue [3, 1]; // "user3" - 1
Example 3:
Set MFD pale Blue:Blackfoot setUserMFDValue [0, 0]; // "user0" - 0 Blackfoot setUserMFDValue [1, 0]; // "user1" - 0 Blackfoot setUserMFDValue [2, 1]; // "user2" - 1 Blackfoot setUserMFDValue [3, 0.1]; // "user3" - 0.1
Example 4:
Hide MFD:Blackfoot setUserMFDValue [3, 0]; // "user3" - 0

Additional Information

See also:
getUserMFDValuesetUserMFDTextgetUserMFDText

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