7.7 KiB
layout | title | description | group | parent |
---|---|---|---|---|
wiki | Spectator | A flexible spectator system | feature | wiki |
1. Overview
The ACE3 spectator system is designed to act as a flexible and easy to configure framework. Most scenarios can be set up as desired using only the settings provided, however public functions are available for finer control of these configurable aspects.
1.1 Spectator System
The current itteration of the ACE3 spectator system only officially supports scenarios using respawn type 3 (or "BASE"). However there's nothing to stop its use alongside anything else, just be aware that it might not function entirely as expected.
By default, the ACE3 spectator system does nothing - meaning existing missions will behave exactly as before. The setting ace_spectator_onDeath
can be used to automatically put players into spectator mode each time they die.
For scenario designers who seek a more advanced setup (such as multiple lives or wave respawning) the function ace_spectator_fnc_setSpectator
is provided to transition players to/from spectator mode as desired.
* Arguments:
* 0: Unit to put into spectator state <OBJECT>
* 1: New spectator state <BOOL> <OPTIONAL>
*
* Return Value:
* None <NIL>
*
* Example:
* [player, true] call ace_spectator_fnc_setSpectator
1.2 Spectatable Units
Spectatable units are stored in an automatically maintained list (ace_spectator_unitList
) on each client. However, directly accessing this list is not encouraged. Instead scenario designers have two tools at their disposal to tweak the list:
- Unit filter
- Unit whitelist/blacklist
The unit filter determines which units will automatically be used to populate the spectatable unit list. It's controlled by setting ace_spectator_filterUnits
and there are three possible options:
- No units
- Player units (default)
- All units
In cases where more specific control is required function ace_spectator_fnc_updateUnits
can be used to whitelist units from the filter or blacklist them from the list (on the local client). The function header details its use:
* Arguments:
* 0: Units to add to the whitelist <ARRAY>
* 1: Use blacklist <BOOL> <OPTIONAL>
*
* Return Value:
* None <NIL>
*
* Example:
* [allUnits,true] call ace_spectator_fnc_updateUnits
*
1.3 Spectatable Sides
Spectatable sides can simply be considered an extra layer of filtering for the spectatable unit list. Again, there are two methods of controlling the spectatable sides:
- Side filter
- Side list
The side list is exactly what it sounds like, a list of sides spectatable by the local client. However, unlike spectatable units the side list remains static and can only be updated manually. This is because the side filter is applied on top of the side list as the unit list is automatically maintained - meaning the unit list will update if the player changes side or if the side relations change.
Note that the unit whitelist/blacklist also serves to override this side filtering mechanism.
The default side list is [west,east,resistance,civilian]
and to update it function ace_spectator_fnc_updateSpectatableSides
can be used:
* Arguments:
* 0: Sides to add <ARRAY>
* 1: Sides to remove <ARRAY>
*
* Return Value:
* Spectatable sides <ARRAY>
*
* Example:
* [[west], [east,civilian]] call ace_spectator_fnc_updateSpectatableSides
The side filter determines which sides from the side list are valid each time the unit list is updated. It's controlled by setting ace_spectator_filterSides
and there are four possible options:
- Player side (default)
- Friendly sides
- Hostile sides
- All sides
1.4 Camera Modes
1.5 Vision Modes
1.6 Camera Attributes
2. Usage
2.1 Spectator Shortcuts
Shortcuts are currently hardcoded in the ACE3 spectator system. Future versions are likely to change that.
2.1.1 Interface Shortcuts
Shortcut | Action |
---|---|
H | Toggle help |
M | Toggle map |
1 | Toggle unit list |
2 | Toggle toolbar |
3 | Toggle compass |
4 | Toggle unit icons |
Backspace | Toggle interface |
2.1.2 Free Camera Shortcuts
Shortcut | Action |
---|---|
W | Camera forward |
S | Camera backward |
A | Camera left |
D | Camera right |
Q | Camera up |
Z | Camera down |
LMB | Camera dolly |
RMB | Camera pan and tilt |
Scrollwheel | Zoom +/- |
Ctrl+Scrollwheel | Speed +/- |
N | Next vision mode |
Ctrl+N | Previous vision mode |
2.1.3 Unit Camera Shortcuts
Shortcut | Action |
---|---|
Right arrow | Next unit |
Left arrow | Previous unit |
RMB | Toggle gun camera |
2.1.4 General shortcuts
Shortcut | Action |
---|---|
Up arrow | Next camera |
Down arrow | Previous camera |
2.2 The Interface
2.2.1 Unit list
The unit list on the left lists all of the units currently available to spectate. Double click on any unit name in the list to switch to the unit. Double click on the current unit to switch between internal and external view.
2.2.2 Toolbar
The toolbar along the bottom of the screen displays various useful values. From left to right these are:
- Unit name
- Camera mode
- Camera zoom/Unit side
- 24-hour Clock
- Vision mode/Unit depth
- Camera/Unit speed
2.2.3 Map
The map overlay will show the current position of the free camera and all spectatable units. The unit icons are tied into the unit icon toggle shortcut. When spectating a unit the map will also show the icons of units it knows about. In free camera you can double click on the map to teleport the camera to the position of the mouse.
3. Dependencies
ace_common