setCompassOscillation: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "") |
Lou Montana (talk | contribs) 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 | {{Command | ||
| arma3 | | arma3 | ||
|0.50 | |0.50 | ||
|gr1= Interaction | |gr1= Interaction | ||
| This command sets random heading on the player's compass (both, in map and in 3D view) with given frequency, which is also randomised. To reset the compass back to defaults, execute: <code>[[setCompassOscillation]] [-1, 0, 0];</code>. | | This command sets random heading on the player's compass (both, in map and in 3D view) with given frequency, which is also randomised. To reset the compass back to defaults, execute: <code>[[setCompassOscillation]] [-1, 0, 0];</code>. | ||
| '''setCompassOscillation''' [angle, frequencyMin, frequencyMax] | | '''setCompassOscillation''' [angle, frequencyMin, frequencyMax] | ||
|p1= [angle, frequencyMin, frequencyMax]: [[Array]] | |p1= [angle, frequencyMin, frequencyMax]: [[Array]] | ||
|p2= angle: [[Number]] - heading deviation angle in [[rad|radians]]; the random angle will be picked up from <tt>[-angle...+angle]</tt> range. | |p2= angle: [[Number]] - heading deviation angle in [[rad|radians]]; the random angle will be picked up from <tt>[-angle...+angle]</tt> range. | ||
|p3= frequencyMin: [[Number]] - lower bound of heading change in seconds | |p3= frequencyMin: [[Number]] - lower bound of heading change in seconds | ||
|p4= frequencyMax: [[Number]] - higher bound of heading change in seconds. The actual frequency is calculated similar to: <code>_frequencyMin + [[random]](_frequencyMax - _frequencyMin);</code> | |p4= frequencyMax: [[Number]] - higher bound of heading change in seconds. The actual frequency is calculated similar to: <code>_frequencyMin + [[random]](_frequencyMax - _frequencyMin);</code> | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= Set compass to oscillate every second within -90/+90 degrees: <code>[[setCompassOscillation]] [<nowiki/>[[rad]] 90, 1, 1]; | |x1= Set compass to oscillate every second within -90/+90 degrees: <code>[[setCompassOscillation]] [<nowiki/>[[rad]] 90, 1, 1]; | ||
</code> | </code> | ||
|x2= Change heading every 60 to 90 seconds: <code>[[setCompassOscillation]] [<nowiki/>[[rad]] 180, 60, 90]; | |x2= Change heading every 60 to 90 seconds: <code>[[setCompassOscillation]] [<nowiki/>[[rad]] 180, 60, 90]; | ||
</code> | </code> | ||
|x3= Make compass go crazy: <code>[[setCompassOscillation]] [<nowiki/>[[rad]] 360, 0.1, 0.2]; | |x3= Make compass go crazy: <code>[[setCompassOscillation]] [<nowiki/>[[rad]] 360, 0.1, 0.2]; | ||
</code> | </code> | ||
| [[visibleCompass]], [[shownCompass]], [[shownCuratorCompass]], [[showCompass]], [[showCuratorCompass]] | | [[visibleCompass]], [[shownCompass]], [[shownCuratorCompass]], [[showCompass]], [[showCuratorCompass]] | ||
| | | | ||
}} | }} | ||
Revision as of 11:12, 18 January 2021
Description
- Description:
- This command sets random heading on the player's compass (both, in map and in 3D view) with given frequency, which is also randomised. To reset the compass back to defaults, execute:
setCompassOscillation [-1, 0, 0];
. - Groups:
- Interaction
Syntax
- Syntax:
- setCompassOscillation [angle, frequencyMin, frequencyMax]
- Parameters:
- [angle, frequencyMin, frequencyMax]: Array
- angle: Number - heading deviation angle in radians; the random angle will be picked up from [-angle...+angle] range.
- frequencyMin: Number - lower bound of heading change in seconds
- frequencyMax: Number - higher bound of heading change in seconds. The actual frequency is calculated similar to:
_frequencyMin + random(_frequencyMax - _frequencyMin);
- Return Value:
- Nothing
Examples
- Example 1:
- Set compass to oscillate every second within -90/+90 degrees:
setCompassOscillation [rad 90, 1, 1];
- Example 2:
- Change heading every 60 to 90 seconds:
setCompassOscillation [rad 180, 60, 90];
- Example 3:
- Make compass go crazy:
setCompassOscillation [rad 360, 0.1, 0.2];
Additional Information
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