M MY Multiplayer: Wiki
Side
Kind

setCinematicAdjustments

Client

Lays shifts and animations over an actor's take. The take stays as recorded and moves with them. It replaces the actor's earlier adjustments.

bool setCinematicAdjustments(cinematic cinematic, string slot, table adjustments)

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.
slotstringThe actor's name.
adjustmentstableA table with the shifts and animations lists, both optional.

Returns

true if they were applied. false if the actor does not exist or the table is invalid, with a warning saying why.

Times are take time, in ms.

Shifts (shifts)

Each shifts entry moves and turns the actor from a time, in order of start:

  • start: when it begins (required).
  • stop: when it ends. 0 lasts to the end of the take.
  • ease: how long it takes to glide in. 0 is a jump.
  • offset: a vec3 in world space.
  • turn: degrees, about where the take is at start.

Animations (animations)

Each animations entry holds an animation over a span, the actor standing still beneath it, each starting once the one before has stopped:

  • start and stop: the span (required).
  • block and name: the animation (required).
  • enter and exit: animations of the same block to go in and out.
  • blend: blend ms, 250 by default.
  • loop: true by default.

A vehicle plays no animations.

Example

local intro = createCinematic("cinematics/intro.cine")
setCinematicAdjustments(intro, "hero", {
    shifts = {
        { start = 0, ease = 500, offset = vec3(0, 2, 0), turn = 15 },
    },
    animations = {
        { start = 4000, stop = 7000, block = "ped", name = "phone_talk" },
    },
})

See also