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
| Name | Type | Description |
|---|---|---|
| cinematic | cinematic | The cinematic. |
| slot | string | The actor's name. |
| adjustments | table | A 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.0lasts to the end of the take.ease: how long it takes to glide in.0is a jump.offset: avec3in world space.turn: degrees, about where the take is atstart.
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:
startandstop: the span (required).blockandname: the animation (required).enterandexit: animations of the same block to go in and out.blend: blend ms,250by default.loop:trueby 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" },
},
})