Spectator Functions

ace_spectator_fnc_getCameraAttributes

Description

Returns the current spectator camera attributes (see setCameraAttributes for details).

Parameters

None

Return Value

Description Datatype(s)
[Mode, Focus, Vision, Position, Direction] ARRAY

Example

[] call ace_spectator_fnc_getCameraAttributes

Authors

  • kymckay

ace_spectator_fnc_players

Description

Return all of the player entities who are currently in ace spectator

Parameters

None

Return Value

Description Datatype(s)
Spectator Players ARRAY

Example

[] call ace_spectator_fnc_players

Authors

  • kymckay

ace_spectator_fnc_setCameraAttributes

Description

Sets the spectator camera attributes as desired. Local effect. All values are optional and default to no change.

Parameters

Index Description Datatype(s) Default Value
0 Camera mode NUMBER  
1 Camera focus OBJECT or BOOL  
2 Camera vision NUMBER  
3 Camera position (ATL) ARRAY  
4 Camera direction (0 - 360) NUMBER  

Return Value

None

Example

[1, objNull] call ace_spectator_fnc_setCameraAttributes

Authors

  • kymckay

ace_spectator_fnc_setSpectator

Description

Enter/exit spectator mode for the local player

Client will be able to communicate in ACRE/TFAR as appropriate If “hide player” is true player will be hidden from group, invisible and invulnerable, but unmoved

Parameters

Index Description Datatype(s) Default Value
0 Spectator state of local client BOOL true
1 Force interface BOOL true
2 Hide player (if alive) BOOL true

Return Value

None

Example

[true] call ace_spectator_fnc_setSpectator

Authors

  • kymckay

ace_spectator_fnc_updateCameraModes

Description

Adds or removes spectator camera modes from the selection available to the local player. Possible camera modes are:

  • 0: Free
  • 1: First person
  • 2: Follow

Default selection is [0,1,2]

Parameters

Index Description Datatype(s) Default Value
0 Camera modes to add ARRAY  
1 Camera modes to remove ARRAY  

Return Value

Description Datatype(s)
Available camera modes ARRAY

Example

[[0], [1,2]] call ace_spectator_fnc_updateCameraModes

Authors

  • kymckay

ace_spectator_fnc_updateSides

Description

Adds or removes sides from the selection available to spectate. Local effect.

Default selection is [west,east,resistance,civilian]

Parameters

Index Description Datatype(s) Default Value
0 Sides to add ARRAY  
1 Sides to remove ARRAY  

Return Value

Description Datatype(s)
Sides available ARRAY

Example

[[west], [east,civilian]] call ace_spectator_fnc_updateSides

Authors

  • kymckay

ace_spectator_fnc_updateUnits

Description

Adds and removed units from the spectator list. Local effect.

Parameters

Index Description Datatype(s) Default Value
0 Units to show in the list ARRAY  
1 Units to hide in the list ARRAY  

Return Value

None

Example

[allPlayers, [player]] call ace_spectator_fnc_updateUnits

Authors

  • kymckay

ace_spectator_fnc_updateVisionModes

Description

Adds or removes spectator vision modes from the selection available to the local player.

Possible vision modes are:

  • -2: Normal
  • -1: Night vision
  • 0: White hot
  • 1: Black hot
  • 2: Light Green Hot / Darker Green cold
  • 3: Black Hot / Darker Green cold
  • 4: Light Red Hot / Darker Red Cold
  • 5: Black Hot / Darker Red Cold
  • 6: White Hot / Darker Red Cold
  • 7: Thermal (Shade of Red and Green, Bodies are white)

Default selection is [-2,-1,0,1]

Parameters

Index Description Datatype(s) Default Value
0 Vision modes to add ARRAY  
1 Vision modes to remove ARRAY  

Return Value

Description Datatype(s)
Available vision modes ARRAY

Example

[[0], [1,2]] call ace_spectator_fnc_updateVisionModes

Authors

  • kymckay