setUserMFDvalue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (See also)
(Redirected page to setUserMFDValue)
 
Line 1: Line 1:
{{Command|= Comments
#REDIRECT [[setUserMFDValue]]
____________________________________________________________________________________________
 
| arma3 |= Game name
 
|1.70|= Game version
____________________________________________________________________________________________
 
| When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry
<syntaxhighlight lang=cpp>
...
class Draw
{
alpha = "user3";
color[] = {"user0","user1","user2"};
...
</syntaxhighlight>
which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD |= Description
____________________________________________________________________________________________
 
| vehicle '''setUserMFDvalue''' [index, value]|= Syntax
 
|p1= vehicle: [[Object]] - an vehicle with MFD |= Parameter 1
 
|p2= index: [[Number]] - index of custom MFD user actions |= Parameter 2
 
|p3= value: [[Number]] - value which should custom source return in MFD |= Parameter 3
 
| [[Nothing]] |= Return value
____________________________________________________________________________________________
 
|x1= <code> BIS_Plane [[setUserMFDvalue]] [0,1]; // user0 in MFD will return 1</code> |= Example 1
 
|x2= Set MFD Red:<code>Blackfoot [[setUserMFDvalue]] [0, 1]; // "user0" - 1
Blackfoot [[setUserMFDvalue]] [1, 0]; // "user1" - 0
Blackfoot [[setUserMFDvalue]] [2, 0]; // "user2" - 0
Blackfoot [[setUserMFDvalue]] [3, 1]; // "user3" - 1</code> |= Example 2
 
|x3= Set MFD pale Blue:<code>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</code> |= Example 3
 
|x4= Hide MFD:<code>Blackfoot [[setUserMFDvalue]] [3, 0]; // "user3" - 0</code> |= Example 4
____________________________________________________________________________________________
 
| [[getUserMFDvalue]], [[setUserMFDText]], [[getUserMFDText]]|= See also
 
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
</dl>
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 11:25, 16 February 2019

Redirect to: