Kegetys Spectator Script

From F2 EN
Jump to: navigation, search

Description

The spectator script component allows dead players to spectate other (still living) players, replacing the default seagull mode. Features include:

  • Free, chase, flyby, top-down and 1st person cameras
  • Automatic display of all units in the mission
  • Camera control with mouse and keyboard shortcuts
  • Unit tags (Colored dots above units) and 3D bullet path indicators (with client addon)
  • Night vision and missile camera
  • Drop camera feature (Mouse + WSAD keys to move camera)
  • Clickable minimap and full screen map with markers indicating unit positions and weapons fire
  • Butterfly mode

Required files

All the code associated with this component is found in:

  • description.ext
  • init.sqf
  • onPlayerRespawnAsSeagull.sqs (note this is an SQS file)
  • f\common\f_spect\common.hpp
  • f\common\f_spect\specta.sqf
  • f\common\f_spect\specta_events.sqf
  • f\common\f_spect\specta_init.sqf
  • f\common\f_spect\spectating.hpp

How to use

Restricting visible sides (Coop missions)

By default, the spectator script will track all units in the mission. If you would like to restrict which sides are tracked (i.e. visible), open the file f\common\f_spect\specta_init.sqf and edit the following line, removing the // at the start:

// KEGsShownSides = [west, east, resistance, civilian];

Remove the names of the sides which you do not want visible. For example, if you only want it to be possible for the dead players to see west and civilian units, change the line to:

KEGsShownSides = [west, civilian];

Restricting visible sides (Attack & Defend missions)

If you would like to restrict which sides are tracked (i.e. visible), based on the side of the player, follow open the file f\common\f_spect\specta_init.sqf and edit the following lines, removing the // at the start of each one:

// if (side player == west) then {KEGsShownSides = [west];};
// if (side player == east) then {KEGsShownSides = [east];};
// if (side player == resistance) then {KEGsShownSides = [resistance];};
// if (side player == civilian) then {KEGsShownSides = [civilian];};

Tips

  • Unless you are making missions for competitive leagues, restricting the spectator script to a player's side can make being dead rather boring.

How to disable

Open the file init.sqf and look for the code segment entitled:

// F2 - Kegetys Spectator Script

Edit the line below, adding // to the start:

[] execVM "f\common\f_spect\specta_init.sqf";

Credits

  • Kegetys
  • ViperMaul
  • Norrin