Cam::shakeCinematic: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with " {{ClientsideJsFunction}} {{JSContainer| ===Required Params=== *'''p0:''' {{RageType|string}} *'''p1:''' {{RageType|number}} ===Return value=== *''' {{RageType|void}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.cam.shakeCinematic(p0, p1) </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> //todo </syntaxhighlight> }} ==See also== {{Cam_functions_c}} Category:Clientside API Category:TODO: Example")
 
No edit summary
Line 1: Line 1:
{{ClientsideJsFunction}}
{{ClientsideJsFunction}}
{{JSContainer|
{{JSContainer|
==Explanation==
This function triggers a cinematic camera shake effect. The intensity and style of the shake are determined by the parameters. This can add visual impact to events such as explosions, collisions, or high-speed moments, enhancing immersion during gameplay.


===Required Params===
===Required Params===
*'''p0:''' {{RageType|string}}
*'''type:''' {{RageType|string}} - The type of shake effect to apply (e.g., "HAND_SHAKE", "SMALL_EXPLOSION_SHAKE").
*'''p1:''' {{RageType|number}}
*'''intensity:''' {{RageType|number}} - The intensity of the shake effect (typically ranges from 0.0 to 1.0).


===Return value===
===Return value===
Line 12: Line 14:
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
mp.game.cam.shakeCinematic(p0, p1)
mp.game.cam.shakeCinematic(type, intensity)
</syntaxhighlight>
</syntaxhighlight>


==Example==
==Example==
The following example applies a hand-held camera shake effect with medium intensity:
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
//todo
mp.game.cam.shakeCinematic("HAND_SHAKE", 0.5);
</syntaxhighlight>
</syntaxhighlight>
}}
}}

Revision as of 18:56, 5 November 2024

Client-Side
Function

 JavaScript



JavaScript Syntax


Explanation

This function triggers a cinematic camera shake effect. The intensity and style of the shake are determined by the parameters. This can add visual impact to events such as explosions, collisions, or high-speed moments, enhancing immersion during gameplay.

Required Params

  • type: string - The type of shake effect to apply (e.g., "HAND_SHAKE", "SMALL_EXPLOSION_SHAKE").
  • intensity: number - The intensity of the shake effect (typically ranges from 0.0 to 1.0).

Return value

  • void

Syntax

mp.game.cam.shakeCinematic(type, intensity)

Example

The following example applies a hand-held camera shake effect with medium intensity:

mp.game.cam.shakeCinematic("HAND_SHAKE", 0.5);


See also