Cam::createCinematicShot: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Syntax==<syntaxhighlight lang="javascript">cam.createCinematicShot(p0, p1, p2, entity);</syntaxhighlight>=== Required Arguments ===*'''p0:''' unknown (to be checked)*'''p1:''' int*'''p2:''' unknown (to be checked)*'''entity:''' Entity handle or object===Return value===*'''Undefined'''==Example==<syntaxhighlight lang="javascript">todo</syntaxhighlight>==See also=={{Cam_function_c}}[[Category:Clientside API]][[Category:TODO: Example]]
{{ClientsideJsFunction}}
{{JSContainer|
 
The `createCinematicShot` function in RageMP initiates a cinematic camera shot that can be focused on a specific entity. This function allows you to create a dramatic view, useful for cutscenes or special sequences where a more controlled camera angle is needed.
 
The parameters `p0`, `p1`, and `p2` are not fully documented, but `entity` specifies the object or player to focus the cinematic shot on.
 
=== Required Params ===
* '''p0:''' {{RageType|unknown}} – Purpose unknown (requires testing).
* '''p1:''' {{RageType|int}} – Possibly shot mode/type.
* '''p2:''' {{RageType|unknown}} – Purpose unknown (requires testing).
* '''entity:''' {{RageType|Entity}} – The entity handle or object to target for the cinematic shot.
 
=== Return Value ===
* '''Undefined''' – This function does not return a value.
 
== Syntax ==
<syntaxhighlight lang="javascript">
mp.game.cam.createCinematicShot(p0, p1, p2, entity);
</syntaxhighlight>
 
== Example ==
<syntaxhighlight lang="javascript">
// Example usage of createCinematicShot
const player = mp.players.local;
const cam = mp.cameras.new("default", new mp.Vector3(0, 0, 10), new mp.Vector3(0, 0, 0), 60);
cam.setActive(true);
mp.game.cam.renderScriptCams(true, false, 0, true, false);
 
const targetEntity = player.handle; // Replace with any valid entity handle
 
// Initiate a cinematic shot focused on the player entity
mp.game.cam.createCinematicShot(cam.handle, 1, 0, targetEntity);
mp.gui.chat.push("Cinematic shot created for player.");
</syntaxhighlight>
}}
== See Also ==
{{Cam_s_function_c}}
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 09:36, 2 November 2024

Client-Side
Function

 JavaScript



JavaScript Syntax


The `createCinematicShot` function in RageMP initiates a cinematic camera shot that can be focused on a specific entity. This function allows you to create a dramatic view, useful for cutscenes or special sequences where a more controlled camera angle is needed.

The parameters `p0`, `p1`, and `p2` are not fully documented, but `entity` specifies the object or player to focus the cinematic shot on.

Required Params

  • p0: unknown – Purpose unknown (requires testing).
  • p1: int – Possibly shot mode/type.
  • p2: unknown – Purpose unknown (requires testing).
  • entity: Entity – The entity handle or object to target for the cinematic shot.

Return Value

  • Undefined – This function does not return a value.

Syntax

mp.game.cam.createCinematicShot(p0, p1, p2, entity);

Example

// Example usage of createCinematicShot
const player = mp.players.local;
const cam = mp.cameras.new("default", new mp.Vector3(0, 0, 10), new mp.Vector3(0, 0, 0), 60);
cam.setActive(true);
mp.game.cam.renderScriptCams(true, false, 0, true, false);

const targetEntity = player.handle; // Replace with any valid entity handle

// Initiate a cinematic shot focused on the player entity
mp.game.cam.createCinematicShot(cam.handle, 1, 0, targetEntity);
mp.gui.chat.push("Cinematic shot created for player.");


See Also

Template:Cam s function c