FF SUITEArma 3 addons

Death, wake, shield, orb, arrival

Soul respawn internals

A complete replacement for the engine respawn flow. It is a respawn template, not a script you call: the engine runs the hooks, and the template holds the player's respawn until the orb reaches a destination.

FF_Horror 8 related functions

Authority and entry points

The component registers CfgRespawnTemplates.FF_Horror_Soul with onPlayerKilled and onPlayerRespawn pointing at x\FF\addons\horror\scripts\*.sqf. Those files are thin execVM entry points for FF_horror_fnc_onPlayerKilled and FF_horror_fnc_onPlayerRespawn. Everything else runs locally on the dead player's machine, so no network round trip is required to animate a death.

StageFunctionRuns on
Arm the holdarmSoulRespawnLocal player, on unit change
DeathonPlayerKilledLocal player
Wake barwakeSoulLocal player
Destination searchseekRespawnLocal player
Position validationsoulSpawnPositionLocal player
ReleasefinishSoulRespawnLocal player
InstallonPlayerRespawnLocal player
RecoveryzeusSoulEmergencyZeus request → local player
ConsumablesoulShieldRequest / soulShieldConsume / soulShieldResultClient → server → client

1. Arming before death

armSoulRespawn resolves the effective template list. It first tries the side-specific key (respawnTemplatesWest, East, Guer, Civ) and falls back to the global respawnTemplates. If FF_Horror_Soul is not listed, the function does nothing. If it is listed, the local player's respawn is pushed to 99999 seconds and a Killed handler is installed once per unit. That handler re-arms the hold and calls onPlayerKilled, because a zero-delay mission can otherwise spawn a replacement before the template hook runs.

2. The death sequence

State snapshot

A state hash map is created: body, class, UID, name, loadout, facewear, death position, spawn position, phase, readiness and any early replacement unit. CBRN visuals are suspended and the blur effect is destroyed so the corpse camera is clean.

Corpse camera

A local camera orbits the body at 3 m radius, 1.8 m height, 1.8 rad/s, without cinematic borders. The camera is a per-frame handler, not a camCommit chain, so it keeps tracking a corpse that Zeus drags around.

Wake bar

wakeSoul creates a structured text and progress control on display 46 and installs KeyDown/KeyUp handlers for wakeKey (Space by default). Progress is capped at 30% of wakeGoal until a shield is applied. Decay is constant while shielded and increases with progress while unshielded. The function returns true only when the bar reached the goal and the body is shielded.

Rise

Phase rise: a local Sign_Sphere10cm_F orb rises 1.2 m over three seconds, then a white fade hands control to the orb. If a Zeus action sets forceRespawn, the orb is deleted and the sequence short-circuits.

Seek

EG Spectator starts, the orb follows the free camera, optional 3D lines point at candidates, and every searchInterval the finder runs. Candidates come from the mission callback or nearestObjects, plus nearestTerrainObjects filtered by class, so map props without a simulation entity still work. The player must first move more than 3 m from the start, then approach within arrivalDistance of the nearest candidate.

Arrival

The orb travels to the destination over two seconds while a local camera watches. The destination position is kept in a local variable so deleting the prop mid-cutscene cannot move the respawn.

Position resolution and release

resolveSpawn may override the coordinate. soulSpawnPosition then runs findEmptyPosition near the destination and falls back to a wider search near the death position, rejecting water and slopes below 0.5 normal Z. finishSoulRespawn sets the state to ready and releases the engine respawn with setPlayerRespawnTime 0, or applies the state to an early unit directly.

3. The shield economy

soulShieldActions installs one ACE interaction on every client. Using it sends FF_horror_soulShieldRequest to the server. soulShieldRequest validates the actor, distance and target, then soulShieldConsume removes FF_Horror_SoulShield from the corpse first and from the helper second, leaving FF_Horror_SoulShield_Empty in the inventory that supplied it. The result is broadcast so both players see the same outcome, and the corpse keeps a receipt so a retried request cannot consume twice.

4. Failure handling

SituationBehaviour
Mission respawn template disabledImmediately releases the respawn.
Corpse deleted mid-sequenceDeleted handler runs emergency recovery at the saved death position.
Engine spawns the unit earlyThe unit is hidden, simulation disabled, and applied when the sequence finishes.
No valid destinationFalls back to the death position; if that fails the engine placement is kept.
Stuck callback or cutsceneZeus emergency recovery terminates the script, clears UI/camera handlers and releases the hold.
Another death during the sequenceThe new state replaces the old one and the previous sequence is terminated.

5. Extension points

  • FF_horror_config before the first death for tuning and callbacks.
  • findDestinations / resolveSpawn to replace the geometry rules entirely.
  • onDestination for scene-specific arrival effects, onRespawn for post-spawn logic.
  • Zeus Soul tools for live recovery; it calls zeusSoulCommand and zeusSoulApply on the affected client.

Related functions

↑ Back to top