setUserMFDValue: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=0-9]{12})" to "|$1=$2 |descr=$3") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|version1= 1.70 | |||
|1.70 | |||
|gr1= Interaction | |gr1= Interaction | ||
|descr= When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry | |descr= 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> | <syntaxhighlight lang="cpp"> | ||
... | // ... | ||
class Draw | class Draw | ||
{ | { | ||
alpha = "user3"; | alpha = "user3"; | ||
color[] = {"user0","user1","user2"}; | color[] = {"user0","user1","user2"}; | ||
... | // ... | ||
</syntaxhighlight> | </syntaxhighlight> | ||
which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD | which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD | ||
|s1= | |s1= vehicle [[setUserMFDValue]] [index, value] | ||
|p1= vehicle: [[Object]] - an vehicle with MFD | |p1= vehicle: [[Object]] - an vehicle with MFD | ||
Line 26: | Line 25: | ||
|p3= value: [[Number]] - value which should custom source return in MFD | |p3= value: [[Number]] - value which should custom source return in MFD | ||
|r1=[[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf>BIS_Plane setUserMFDValue [0,1]; // user0 in MFD will return 1</sqf> | ||
|x2= Set MFD Red:< | |x2= Set MFD Red: | ||
Blackfoot | <sqf> | ||
Blackfoot | Blackfoot setUserMFDValue [0, 1]; // "user0" - 1 | ||
Blackfoot | Blackfoot setUserMFDValue [1, 0]; // "user1" - 0 | ||
Blackfoot setUserMFDValue [2, 0]; // "user2" - 0 | |||
Blackfoot setUserMFDValue [3, 1]; // "user3" - 1 | |||
</sqf> | |||
|x3= Set MFD pale Blue:< | |x3= Set MFD pale Blue: | ||
Blackfoot | <sqf> | ||
Blackfoot | Blackfoot setUserMFDValue [0, 0]; // "user0" - 0 | ||
Blackfoot | Blackfoot setUserMFDValue [1, 0]; // "user1" - 0 | ||
Blackfoot setUserMFDValue [2, 1]; // "user2" - 1 | |||
Blackfoot setUserMFDValue [3, 0.1]; // "user3" - 0.1 | |||
</sqf> | |||
|x4= Hide MFD:< | |x4= Hide MFD: | ||
<sqf>Blackfoot setUserMFDValue [3, 0]; // "user3" - 0</sqf> | |||
|seealso= [[getUserMFDValue]] | |seealso= [[getUserMFDValue]] [[setUserMFDText]] [[getUserMFDText]] | ||
}} | }} |
Latest revision as of 21:54, 7 May 2022
Description
- Description:
- When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry
which could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD
// ... class Draw { alpha = "user3"; color[] = {"user0","user1","user2"}; // ...
- 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:
- getUserMFDValue setUserMFDText getUserMFDText
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