{"name":"setCompassOscillation","operator":null,"title":"setCompassOscillation","type":"command","url":"https://community.bistudio.com/wiki/setCompassOscillation","revid":351911,"updated":"2024-01-25T09:37:29Z","groups":["Interaction"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":"local","server_exec":false},"exec":null,"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.","syntaxes":[{"syntax":"setCompassOscillation [angle, frequencyMin, frequencyMax]","since":null,"effect":null,"exec":null,"params":[{"name":"angle","type":"Number","optional":false,"default":null,"description":"heading deviation angle in radians; the random angle will be picked up from `[-angle...+angle]` range","types":["Number"],"since":null,"text":"angle: Number - heading deviation angle in radians; the random angle will be picked up from `[-angle...+angle]` range"},{"name":"frequencyMin","type":"Number","optional":false,"default":null,"description":"lower bound of heading change in seconds","types":["Number"],"since":null,"text":"frequencyMin: Number - lower bound of heading change in seconds"},{"name":"frequencyMax","type":"Number","optional":false,"default":null,"description":"higher bound of heading change in seconds","types":["Number"],"since":null,"text":"frequencyMax: Number - higher bound of heading change in seconds"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[angle, frequencyMin, frequencyMax]","types":["Array"]}}],"examples":[{"text":"Set compass to oscillate every second within -90/+90 degrees:\n\n```sqf\nsetCompassOscillation [rad 90, 1, 1];\n```","code":["setCompassOscillation [rad 90, 1, 1];"]},{"text":"Change heading every 60 to 90 seconds:\n\n```sqf\nsetCompassOscillation [rad 180, 60, 90];\n```","code":["setCompassOscillation [rad 180, 60, 90];"]},{"text":"Make compass go crazy:\n\n```sqf\nsetCompassOscillation [rad 360, 0.1, 0.2];\n```","code":["setCompassOscillation [rad 360, 0.1, 0.2];"]},{"text":"Reset to default behaviour:\n\n```sqf\nsetCompassOscillation [-1, 0, 0];\n```","code":["setCompassOscillation [-1, 0, 0];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["visibleCompass","shownCompass","shownCuratorCompass","showCompass","showCuratorCompass","setCompassDeclination"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Interaction","Introduced with Arma 3 version 0.50","Scripting Commands","Scripting Commands: Local Effect"]}