setCompassOscillation: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "<code>([^<]*)<nowiki\/?>([^<]*)<\/code>" to "<code>$1$2</code>")
Line 21: Line 21:


|x1= Set compass to oscillate every second within -90/+90 degrees:
|x1= Set compass to oscillate every second within -90/+90 degrees:
<code>setCompassOscillation [<nowiki/>rad 90, 1, 1];</code>
<code>setCompassOscillation [rad 90, 1, 1];</code>


|x2= Change heading every 60 to 90 seconds:
|x2= Change heading every 60 to 90 seconds:
<code>setCompassOscillation [<nowiki/>rad 180, 60, 90];</code>
<code>setCompassOscillation [rad 180, 60, 90];</code>


|x3= Make compass go crazy:
|x3= Make compass go crazy:
<code>setCompassOscillation [<nowiki/>rad 360, 0.1, 0.2];</code>
<code>setCompassOscillation [rad 360, 0.1, 0.2];</code>


|x4= Reset to default behaviour:
|x4= Reset to default behaviour:

Revision as of 11:28, 13 May 2022

Hover & click on the images for description

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.
Groups:
Interaction

Syntax

Syntax:
setCompassOscillation [angle, frequencyMin, frequencyMax]
Parameters:
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
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];
Example 4:
Reset to default behaviour: setCompassOscillation [-1, 0, 0];

Additional Information

See also:
visibleCompass shownCompass shownCuratorCompass showCompass showCuratorCompass

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