FF SUITEArma 3 addons

Shared clock, cues, staging, visibility, scene vehicles

Synchronized scenes internals

A scene is a locally registered timeline that the server starts on every current machine against one shared server clock. It carries no gameplay authority; visibility, vehicles and view distance are separate, explicitly bounded services that a scene may use.

FF_Cinematic 8 related functions

1. Definition and broadcast

// every machine that takes part
["intro", 30, [[5, {hint "Five seconds in"}]] ,
    { params ["_id","_generation","_start","_data"]; /* start */ },
    { params ["_id","_generation","_completed","_data"]; /* cleanup */ }
] call FF_cinematic_fnc_sceneRegister;

// server
["intro", serverTime + 3, ["night"]] call FF_cinematic_fnc_sceneBroadcast;

IDs are capped at 128 characters, durations at 1–3600 seconds, cues at 256 and registered definitions at 64. Cue offsets must be non-decreasing, inside the duration and paired with code. sceneBroadcast accepts up to 32 primitive data values (string, number or boolean), starts no earlier than serverTime and no later than one hour ahead, and returns a monotonically increasing generation. sceneCancel broadcasts a matching cancellation.

A definition is local: each participating machine must register it before the broadcast. A late joiner has no definition and therefore no active scene unless the mission broadcasts again. Receiving a scene replaces any earlier instance and ignores stale generations; sceneTick runs due cues on the common clock.

2. Temporary visibility

sceneVisibilityStart(id, players, duration) hides up to 128 explicit player bodies globally for 1–1800 seconds. The server stores the previous hidden flag, UID and network owner, and restores it when the duration ends or the player dies, disconnects or changes owner. A player may request release from their own scene through sceneVisibilityRequest; sceneVisibilityStop releases everyone the scene owns.

3. Scene vehicles and crew

sceneVehicleCreate(id, template, createCrew, onReady, placement) creates a local, damage-disabled copy of an explicit template on the client, optionally with isolated AI crew. Placement is NONE or FLY; up to eight scene vehicles may exist per client. sceneVehicleTick releases a vehicle when its player or the vehicle disappears.

Crew created this way are locally owned. The client asks the server to hide them through sceneCrewRequest; the server acknowledges with sceneVehicleAck, revealing the crew only on the owner, and sceneCrewReleaseRequest / sceneCrewRelease delete the disposable crew on the server.

4. Editor templates

sceneTemplateStart(id, vehicle, includeCrew) is the server-owned alternative: it hides and freezes an explicit editor vehicle and optional AI crew, remembers the original visibility and simulation states, and restores them on release. Up to 64 templates may be staged. A template boarded by a player, deleted or otherwise invalidated is released automatically by sceneTemplateTick.

5. Persistence block

sceneBlocksPersistence(unit) returns true while a unit is in a facecam stage, a pulse recovery or a scene-owned hidden state. Reconnect persistence uses it to postpone restoration until the staging state has ended.

6. View-distance leases

viewDistanceStart(id, terrain, objects) acquires a local lease with values between 100 and 50 000 metres. The first lease captures the player's baseline; later leases stack, and the most recently acquired lease wins. Up to 16 leases may exist. viewDistanceStop releases one lease and restores the previous lease or the captured baseline. The 0.25 s worker keeps the active lease applied without touching unrelated camera settings.

7. Authoring rules

  • Register the same scene definition on every machine that must show it; the server only broadcasts.
  • Keep cue bodies idempotent. A replacement scene can stop the old one before the new timeline starts.
  • Use sceneBlocksPersistence before moving or hiding a body that persistence may restore.
  • Release visibility, scene vehicles and view-distance leases explicitly when a scene is cancelled early.

Code-level guarantees: argument bounds, generation guards and cue ordering. In-engine staging, crew locality and camera behaviour remain manual checks.

Related functions

↑ Back to top