End Game Spectator Mode – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Introduction==
{{TOC|side}}
With the [http://arma3.com/nexus| Nexus Update] we've introduced a new spectator mode which should improve the way players can observe a match.
The Nexus Update has introduced a new spectator mode which should improve the way players can observe a match.
While this new scenario viewing mode was introduced with [http://dev.arma3.com/post/oprep-end-game| End Game] it can be used outside of the multiplayer mode, open to community members to use it in their own missions.
While this new scenario viewing mode was introduced with [[Arma 3: MP End Game|End Game]] it can be used outside of the multiplayer mode, open to community members to use in their own missions.


==Camera Perspectives==
 
== Camera Perspectives ==
 
* 1st Person Perspective
* Free Perspective (Optional)
* Free Perspective (Optional)
* 3th Person Perspective (Optional)
* 3rd Person Perspective (Optional)
* 1st Person Perspective
 
 
== Vision Modes ==


==Vision Modes==
* Normal
* Normal
* Night Vision (In 1PP depends on the unit's current state)
* Night Vision (in 1PP depends on the unit's current state)
* Thermal Vision (In 1PP depends on the unit's current state)
* Thermal Vision (in 1PP depends on the unit's current state)


==Flashlight Mode==
Point lights are created at the camera location and at the cursor location in world.


==Custom Map==
== Flashlight Mode ==
A custom map designed for the spectator mode, allowing for fast but precise map navigation and changing focused unit.


[[File:BIS Arma3 EDEN VirtualSpectator 4.jpg|400px]]
Point lights are created at the camera location and at the cursor location in world.


==Controls==
===W/S===
* Free Perspective movement forward / backward


===A/D===
== Custom Map ==
* Free Perspective movement left / right


===Q/Z===
A custom map designed for the spectator mode, allowing for fast but precise map navigation and changing focused unit.
* Free Perspective movement up / down


===Movement + Shift===
[[File:BIS Arma3 EDEN VirtualSpectator 4.jpg|400px]]
* Free Perspective fast speed


===Movement + Alt===
* Free Perspective very fast speed


===Movement + Shift + Alt===
== Controls ==
* Free Perspective ultra fast speed


===RMB===
'''For a full list see the ingame control hints'''
{| class="wikitable sortable"
! Keybinding
! Action
|-
| {{Controls|W}}/{{Controls|S}}
| Free Perspective movement forward / backward
|-
| {{Controls|A}}/{{Controls|D}}
| Free Perspective movement left / right
|-
| {{Controls|Q}}/{{Controls|Z}}
| Free Perspective movement up / down
|-
| {{Controls|Shift|W/A/S/D/Q/Z}}
| Free Perspective fast speed
|-
| {{Controls|Alt|W/A/S/D/Q/Z}}
| Free Perspective very fast speed
|-
| {{Controls|Alt|Shift|W/A/S/D/Q/Z}}
| Free Perspective ultra fast speed
|-
| {{Controls|RMB}}
|
* Look in Free Perspective
* Look in Free Perspective
* Rotate in 3 Person Perspective
* Rotate in 3 Person Perspective
|-
| {{Controls|LMB}}
| Select / Deselect spectator focused unit / vehicle
|-
| {{Controls|Mouse}} || Look / Rotate Around
|-
| {{Controls|Backspace}} || Hide / Show spectator interface
|-
| {{Controls|Space}} || If spectator has a unit focused it changes through the available camera modes
|-
| {{Controls|L}} || Flashlight mode
|-
| {{Controls|M}} || Map
|-
| {{Controls|N}} || Night Vision
|-
| {{Controls|Ctrl|F1}}..{{Controls|F10}} || Save currently selected soldier
|-
| {{Controls|F1}}..{{Controls|F10}} || Select saved soldier
|-
| {{Controls|Ctrl|0}}..{{Controls|9}} || Save current Free Perspective camera position
|-
| {{Controls|0}}..{{Controls|9}} || Select Free Perspective camera position
|-
| {{Controls|NumEnter}}/{{Controls|Num0}}/{{Controls|Num.}} || Select camera view
|-
| {{Controls|O}} || Draw projectiles
|-
| {{Controls|Page Up}} || View Distance +250 m
|-
| {{Controls|Page Down}} || View Distance -250 m
|}


===LMB===
== Scenario Implementation ==
* Select / Deselect spectator focused unit / vehicle


===Look / Rotate Around===
=== Debug Spectator Mode ===
* Mouse movement


===Backspace===
* Hide / Show spectator interface
===Space Bar===
* If spectator has a unit focused it changes through the available camera modes
==Scenario Implementation==
===Debug Spectator Mode===
It is possible to access the Spectator Mode while previewing in the Editor / EDEN Editor by pressing Esc and clicking Spectator, to close you can repeat previous step.
It is possible to access the Spectator Mode while previewing in the Editor / EDEN Editor by pressing Esc and clicking Spectator, to close you can repeat previous step.


[[File:BIS Arma3 EDEN VirtualSpectator 3.jpg|400px]]
[[File:BIS Arma3 EDEN VirtualSpectator 3.jpg|400px]]


===Respawn Type===
=== Respawn Type ===
 
In certain respawn types, the Spectator Mode is automatically executed upon death and replaces the old mode.
In certain respawn types, the Spectator Mode is automatically executed upon death and replaces the old mode.
It works automatically with respawn 1 ("Bird") and 5 ("Side" if there's no AI left).
It works automatically with respawn 1 ("Bird") and 5 ("Side" if there's no AI left).
For more information on the available respawn types and their specific behavior check this page.
For more information on the available respawn types and their specific behavior see {{Link|Arma 3: Respawn#Respawn Types}}.


<code>respawn = 1;</code>
<syntaxhighlight lang="cpp">respawn = 1;</syntaxhighlight>
 
=== Full Control ===


===Full Control===
In case you would like to control when a player starts / stops spectating, you can use the built-in functions to do exactly that.
In case you would like to control when a player starts / stops spectating, you can use the built-in functions to do exactly that.
If you wish to start the spectator mode, you can execute the following function:
See [[BIS_fnc_EGSpectator]] for more information.


// Param1: A string describing the action to be taken by the spectator function<br/>
=== Spectate When Dead ===
// Param2: The custom arguments that are sent to the spectator function<br/>


<code>["Initialize", [player, [], true, true, true, true, true, true, true, true]] call BIS_fnc_EGSpectator;</code>
If you are using a respawn type different then 1 ("Bird"), you may want to execute the spectator mode when a player dies, then stop the spectator when the player respawns, this could be achieved in many ways, such as the one below, which will make every player start spectating when dead, and stop spectating when he respawns, 60 seconds after:


// The custom array for Initialize function can contain:<br/>
'''Description.ext'''
_this select 0 : The target player object<br/>
<syntaxhighlight lang="cpp">
_this select 1 : Whitelisted sides, empty means all<br/>
respawn = 3;
_this select 2 : Whether AI can be viewed by the spectator<br/>
respawnDelay = 60;
_this select 3 : Whether Free camera mode is available<br/>
</syntaxhighlight>
_this select 4 : Whether 3th Person Perspective camera mode is available<br/>
_this select 5 : Whether to show Focus Info stats widget<br/>
_this select 6 : Whether or not to show camera buttons widget<br/>
_this select 7 : Whether to show controls helper widget<br/>
_this select 8 : Whether to show header widget<br/>
_this select 9 : Whether to show entities / locations lists<br/>


If the spectator mode is active and you would like to terminate it, run the following function:
'''onPlayerKilled.sqf'''
<code>["Terminate"] call BIS_fnc_EGSpectator;</code>
<sqf>["Initialize", [player, [], true]] call BIS_fnc_EGSpectator;</sqf>


===Spectate when dead===
'''onPlayerRespawn.sqf'''
If you are using a respawn type different then 1 ("Bird"), you may want to execute the spectator mode when a player dies, then stop the spectator when the player respawns, this could be achieved in many ways, such as the one bellow, which will make every player start spectating when dead, and stop spectating when he respawns, 60 seconds after:
<sqf>["Terminate"] call BIS_fnc_EGSpectator;</sqf>


'''Description.ext'''
=== Virtual Spectator ===
<code>respawn = 3;
respawnDelay = 60;</code>
'''onPlayerKilled.sqf'''
<code>["Initialize", [player, [], true]] call BIS_fnc_EGSpectator;</code>
'''onPlayerRespawn.sqf'''
<code>["Terminate"] call BIS_fnc_EGSpectator;</code>


===Virtual Spectator===
The new Spectator mode also brings a new special object that can be controlled by a player and will give the controlling player the Spectator Mode control, just drop it in a scenario and start spectating that easily.
The new Spectator mode also brings a new special object that can be controlled by a player and will give the controlling player the Spectator Mode control, just drop it in a scenario and start spectating that easily.
If you are accessing the Virtual Spectator from EDEN Editor, you will see custom attributes to control certain parts of the Virtual Spectator functionality within EDEN.
If you are accessing the Virtual Spectator from EDEN Editor, you will see custom attributes to control certain parts of the Virtual Spectator functionality within EDEN.
Line 110: Line 136:
[[File:BIS Arma3 EDEN VirtualSpectator 1.jpg|400px]]
[[File:BIS Arma3 EDEN VirtualSpectator 1.jpg|400px]]
[[File:BIS Arma3 EDEN VirtualSpectator 2.jpg|400px]]
[[File:BIS Arma3 EDEN VirtualSpectator 2.jpg|400px]]
=== Mission Configuration ===
Set the following variables in the [[player]]'s namespace, preferable in [[Event Scripts|initPlayerLocal.sqf]] to configure the specatator UI.
<sqf>
player setVariable ["AllowAi", false]; //Can the player view AI units
player setVariable ["AllowFreeCamera", false]; //Is free camera allowed
player setVariable ["Allow3PPCamera", false]; //Is third person camera allowed
player setVariable ["ShowFocusInfo", false]; //Will the focus info widget be shown if a player selects an entity
player setVariable ["ShowCameraButtons", false]; //Will camera buttons be shown. These allow to change camera mode, same as pressing "space". Keep in mind that these buttons overlap with the respawn UI
player setVariable ["ShowControlsHelper", true]; //Should control hints be shown. Be aware that pressing "F1" will not bring them up any longer if disabled
player setVariable ["ShowHeader", true]; //Should mission time be shown at the top
player setVariable ["ShowLists", true]; //Should entity and location lists be shown
player setVariable ["WhitelistedSides", ["WEST"]]; //Which sides can be watched
</sqf>
==== Overwriting Random Insignias ====
[[File: arma3 spectator insignia.png|thumb|350px]]
By default, spectator assigns a random insignia for each group. This leads to issues where western forces have eastern insignias and so on.
With the following script one can force a certain insignia per side. Of course, this script can be adjusted to your needs. The script needs to be executed for every [[player]] preferably in [[Event Scripts|initPlayerLocal.sqf]].
<sqf>
#define INSIGNIA_DEFAULT missionNamespace getVariable ["Spectator_Default_Insignia", "a3\3den\data\displays\display3den\panelright\side_empty_ca.paa"]
#define INSIGNIA_DEFAULT_WEST missionNamespace getVariable ["Spectator_Default_Insignia_West", "a3\3den\data\displays\display3den\panelright\side_west_ca.paa"]
#define INSIGNIA_DEFAULT_INDEPENDENT missionNamespace getVariable ["Spectator_Default_Insignia_Independent", "a3\3den\data\displays\display3den\panelright\side_guer_ca.paa"]
#define INSIGNIA_DEFAULT_EAST missionNamespace getVariable ["Spectator_Default_Insignia_East", "a3\3den\data\displays\display3den\panelright\side_east_ca.paa"]
#define INSIGNIA_DEFAULT_CIVILIAN missionNamespace getVariable ["Spectator_Default_Insignia_Civilian", "a3\3den\data\displays\display3den\panelright\side_civ_ca.paa"]
//Set default insignia shown in spectator mode for every newly created group
addMissionEventHandler ["GroupCreated",
{
params ["_group"];
private _insignia = switch (side _group) do
{
case west: { INSIGNIA_DEFAULT_WEST; };
case independent: { INSIGNIA_DEFAULT_INDEPENDENT; };
case east: { INSIGNIA_DEFAULT_EAST; };
case civilian: { INSIGNIA_DEFAULT_CIVILIAN; };
default { INSIGNIA_DEFAULT; };
};
_group setVariable ["BIS_dynamicGroups_lastinsignia", _insignia];
}];
//Set default insignia shown in spectator mode for every existing group at mission start
allGroups apply
{
private _insignia = switch (side _x) do
{
case west: { INSIGNIA_DEFAULT_WEST; };
case independent: { INSIGNIA_DEFAULT_INDEPENDENT; };
case east: { INSIGNIA_DEFAULT_EAST; };
case civilian: { INSIGNIA_DEFAULT_CIVILIAN; };
default { INSIGNIA_DEFAULT; };
};
_x setVariable ["BIS_dynamicGroups_lastinsignia", _insignia];
};
true
</sqf>
== Game Phase Setup ==
The spectator UI can display different game phases.
These can be set by executing
<sqf>["SetGamePhase", ["PHASE III"]] call (uiNamespace getVariable ["RscDisplayEGSpectator_script", {}]);</sqf>
where "PHASE III" can be any string describing the phase.
The current game phase can be retrieved with
<sqf>
["GetGamePhase"] call (uiNamespace getVariable ["RscDisplayEGSpectator_script", {}]); // "PHASE III"
</sqf>
{{GameCategory|arma3|Editing}}

Latest revision as of 13:04, 6 November 2024

The Nexus Update has introduced a new spectator mode which should improve the way players can observe a match. While this new scenario viewing mode was introduced with End Game it can be used outside of the multiplayer mode, open to community members to use in their own missions.


Camera Perspectives

  • 1st Person Perspective
  • Free Perspective (Optional)
  • 3rd Person Perspective (Optional)


Vision Modes

  • Normal
  • Night Vision (in 1PP depends on the unit's current state)
  • Thermal Vision (in 1PP depends on the unit's current state)


Flashlight Mode

Point lights are created at the camera location and at the cursor location in world.


Custom Map

A custom map designed for the spectator mode, allowing for fast but precise map navigation and changing focused unit.

BIS Arma3 EDEN VirtualSpectator 4.jpg


Controls

For a full list see the ingame control hints

Keybinding Action
W/S Free Perspective movement forward / backward
A/D Free Perspective movement left / right
Q/Z Free Perspective movement up / down
⇧ Shift + W/A/S/D/Q/Z Free Perspective fast speed
Alt + W/A/S/D/Q/Z Free Perspective very fast speed
Alt + ⇧ Shift + W/A/S/D/Q/Z Free Perspective ultra fast speed
Right Mouse Button
  • Look in Free Perspective
  • Rotate in 3 Person Perspective
Left Mouse Button Select / Deselect spectator focused unit / vehicle
Mouse Look / Rotate Around
Hide / Show spectator interface
Space If spectator has a unit focused it changes through the available camera modes
L Flashlight mode
M Map
N Night Vision
Ctrl + F1..F10 Save currently selected soldier
F1..F10 Select saved soldier
Ctrl + 0..9 Save current Free Perspective camera position
0..9 Select Free Perspective camera position
NUM Enter ↵/NUM 0/NUM . Select camera view
O Draw projectiles
Page Up View Distance +250 m
Page Down View Distance -250 m

Scenario Implementation

Debug Spectator Mode

It is possible to access the Spectator Mode while previewing in the Editor / EDEN Editor by pressing Esc and clicking Spectator, to close you can repeat previous step.

BIS Arma3 EDEN VirtualSpectator 3.jpg

Respawn Type

In certain respawn types, the Spectator Mode is automatically executed upon death and replaces the old mode. It works automatically with respawn 1 ("Bird") and 5 ("Side" if there's no AI left). For more information on the available respawn types and their specific behavior see Arma 3: Respawn - Respawn Types.

respawn = 1;

Full Control

In case you would like to control when a player starts / stops spectating, you can use the built-in functions to do exactly that. See BIS_fnc_EGSpectator for more information.

Spectate When Dead

If you are using a respawn type different then 1 ("Bird"), you may want to execute the spectator mode when a player dies, then stop the spectator when the player respawns, this could be achieved in many ways, such as the one below, which will make every player start spectating when dead, and stop spectating when he respawns, 60 seconds after:

Description.ext

respawn = 3;
respawnDelay = 60;

onPlayerKilled.sqf

["Initialize", [player, [], true]] call BIS_fnc_EGSpectator;

onPlayerRespawn.sqf

["Terminate"] call BIS_fnc_EGSpectator;

Virtual Spectator

The new Spectator mode also brings a new special object that can be controlled by a player and will give the controlling player the Spectator Mode control, just drop it in a scenario and start spectating that easily. If you are accessing the Virtual Spectator from EDEN Editor, you will see custom attributes to control certain parts of the Virtual Spectator functionality within EDEN.

BIS Arma3 EDEN VirtualSpectator 1.jpg BIS Arma3 EDEN VirtualSpectator 2.jpg

Mission Configuration

Set the following variables in the player's namespace, preferable in initPlayerLocal.sqf to configure the specatator UI.

player setVariable ["AllowAi", false]; //Can the player view AI units player setVariable ["AllowFreeCamera", false]; //Is free camera allowed player setVariable ["Allow3PPCamera", false]; //Is third person camera allowed player setVariable ["ShowFocusInfo", false]; //Will the focus info widget be shown if a player selects an entity player setVariable ["ShowCameraButtons", false]; //Will camera buttons be shown. These allow to change camera mode, same as pressing "space". Keep in mind that these buttons overlap with the respawn UI player setVariable ["ShowControlsHelper", true]; //Should control hints be shown. Be aware that pressing "F1" will not bring them up any longer if disabled player setVariable ["ShowHeader", true]; //Should mission time be shown at the top player setVariable ["ShowLists", true]; //Should entity and location lists be shown player setVariable ["WhitelistedSides", ["WEST"]]; //Which sides can be watched

Overwriting Random Insignias

arma3 spectator insignia.png

By default, spectator assigns a random insignia for each group. This leads to issues where western forces have eastern insignias and so on. With the following script one can force a certain insignia per side. Of course, this script can be adjusted to your needs. The script needs to be executed for every player preferably in initPlayerLocal.sqf.

#define INSIGNIA_DEFAULT missionNamespace getVariable ["Spectator_Default_Insignia", "a3\3den\data\displays\display3den\panelright\side_empty_ca.paa"] #define INSIGNIA_DEFAULT_WEST missionNamespace getVariable ["Spectator_Default_Insignia_West", "a3\3den\data\displays\display3den\panelright\side_west_ca.paa"] #define INSIGNIA_DEFAULT_INDEPENDENT missionNamespace getVariable ["Spectator_Default_Insignia_Independent", "a3\3den\data\displays\display3den\panelright\side_guer_ca.paa"] #define INSIGNIA_DEFAULT_EAST missionNamespace getVariable ["Spectator_Default_Insignia_East", "a3\3den\data\displays\display3den\panelright\side_east_ca.paa"] #define INSIGNIA_DEFAULT_CIVILIAN missionNamespace getVariable ["Spectator_Default_Insignia_Civilian", "a3\3den\data\displays\display3den\panelright\side_civ_ca.paa"] //Set default insignia shown in spectator mode for every newly created group addMissionEventHandler ["GroupCreated", { params ["_group"]; private _insignia = switch (side _group) do { case west: { INSIGNIA_DEFAULT_WEST; }; case independent: { INSIGNIA_DEFAULT_INDEPENDENT; }; case east: { INSIGNIA_DEFAULT_EAST; }; case civilian: { INSIGNIA_DEFAULT_CIVILIAN; }; default { INSIGNIA_DEFAULT; }; }; _group setVariable ["BIS_dynamicGroups_lastinsignia", _insignia]; }]; //Set default insignia shown in spectator mode for every existing group at mission start allGroups apply { private _insignia = switch (side _x) do { case west: { INSIGNIA_DEFAULT_WEST; }; case independent: { INSIGNIA_DEFAULT_INDEPENDENT; }; case east: { INSIGNIA_DEFAULT_EAST; }; case civilian: { INSIGNIA_DEFAULT_CIVILIAN; }; default { INSIGNIA_DEFAULT; }; }; _x setVariable ["BIS_dynamicGroups_lastinsignia", _insignia]; }; true


Game Phase Setup

The spectator UI can display different game phases. These can be set by executing

["SetGamePhase", ["PHASE III"]] call (uiNamespace getVariable ["RscDisplayEGSpectator_script", {}]);

where "PHASE III" can be any string describing the phase.

The current game phase can be retrieved with

["GetGamePhase"] call (uiNamespace getVariable ["RscDisplayEGSpectator_script", {}]); // "PHASE III"