addCamShake: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *s([0-9]) *= ([^ ]+)? ?'''([a-zA-Z0-9_]+)''' ?([^ ]+)? " to " |s$1= $2 $3 $4 ")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *S([a-z ])" to "$1 - s$2")
(14 intermediate revisions by 2 users not shown)
Line 2: Line 2:


|game1= arma2oa
|game1= arma2oa
|version1= 1.51
|version1= 1.50


|game2= tkoh
|game2= tkoh
Line 16: Line 16:
|descr= Creates the camera shaking effect, like when you are near an explosion
|descr= Creates the camera shaking effect, like when you are near an explosion


|s1= [[addCamShake]]  [power, duration, frequency]
|s1= [[addCamShake]]  [power, duration, frequency]


|p1= power: [[Number]] - Strength of shake (camera movement), practical range is 0 to 20
|p1= power: [[Number]] - strength of shake (camera movement), practical range is 0 to 20


|p2= duration: [[Number]] - Duration in seconds
|p2= duration: [[Number]] - duration in seconds divided by 2


|p3= frequency: [[Number]] - Frequency of shake, practical range is 0 to 100
|p3= frequency: [[Number]] - frequency of shake, practical range is 0 to 100


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[[addCamShake]] [10, 1, 25];</code>
|x1= <sqf>addCamShake [10, 2, 25]; // Shakes the camera for 1 second</sqf>


|x2= <code>[[enableCamShake]] [[true]];
|x2= <sqf>enableCamShake true;
[[addCamShake]] [5, 5, 25];</code>
addCamShake [5, 5, 25];</sqf>


|seealso= [[enableCamShake]], [[setCamShakeDefParams]], [[setCamShakeParams]], [[resetCamShake]]
|seealso= [[enableCamShake]] [[setCamShakeDefParams]] [[setCamShakeParams]] [[resetCamShake]]
}}
}}

Revision as of 16:49, 8 November 2023

Hover & click on the images for description

Description

Description:
Creates the camera shaking effect, like when you are near an explosion
Groups:
Camera Control

Syntax

Syntax:
addCamShake [power, duration, frequency]
Parameters:
power: Number - strength of shake (camera movement), practical range is 0 to 20
duration: Number - duration in seconds divided by 2
frequency: Number - frequency of shake, practical range is 0 to 100
Return Value:
Nothing

Examples

Example 1:
addCamShake [10, 2, 25]; // Shakes the camera for 1 second
Example 2:
enableCamShake true; addCamShake [5, 5, 25];

Additional Information

See also:
enableCamShake setCamShakeDefParams setCamShakeParams resetCamShake

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