setUserMFDvalue: Difference between revisions

From Bohemia Interactive Community
(Undo revision 104021 by Killzone Kid (talk) Apparently not how it is done, go figure)
(correct usage)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Store user value in MFD, limit is 10, user0...user9. |= Description
| 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 Balckfoot HUD |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 22: Line 31:
   
   
|x1= <code> BIS_Plane [[setUserMFDvalue]] [0,1]; // user0 in MFD will return 1</code> |= Example 1
|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
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 16:46, 26 July 2017

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 Balckfoot HUD
Groups:
Uncategorised

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:
See also needed

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

Bottom Section