Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_CaptureAndHoldManager Interface Reference

Capture & Hold manager that allows registration and management of areas. More...

Inheritance diagram for SCR_CaptureAndHoldManager:
[legend]

Public Member Functions

void RegisterArea (SCR_CaptureAndHoldArea area)
 Register a capture area to this manager. Area must be unique.
 
void UnregisterArea (SCR_CaptureAndHoldArea area)
 Unregisters a capture area from this manager.
 
void RegisterSpawnArea (SCR_CaptureAndHoldSpawnArea spawnArea)
 Register a spawn area to this manager. Area must be unique.
 
void UnregisterSpawnArea (SCR_CaptureAndHoldSpawnArea spawnArea)
 Unregisters a capture area from this manager.
 
int GetAreaCount ()
 Returns the number of registered capture areas.
 
int GetSpawnAreaCount ()
 Returns the number of registered spawn areas.
 
SCR_CaptureAndHoldArea GetArea (int index)
 Returns an area at given index.
 
SCR_CaptureAndHoldSpawnArea GetSpawnArea (int index)
 Returns a spawn area at given index.
 
int GetAreas (notnull array< SCR_CaptureAndHoldArea > outAreas)
 Fills the provided array with all registered zones and returns the count.
 
int GetAreas (notnull array< SCR_CaptureAndHoldSpawnArea > outAreas)
 Fills the provided array with all registered spawn areas and returns the count.
 
bool GetIsAreaFactionPersistent ()
 Returns true when factions should be persistent, ie.
 
- Public Member Functions inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode GetGameMode ()
 
void OnGameEnd ()
 Called on all machines when the world ends.
 
void OnGameStateChanged (SCR_EGameModeState state)
 Called when game mode state changes called on all machines.
 
void OnGameModeStart ()
 Called on every machine when game mode starts.
 
void OnGameModeEnd (SCR_GameModeEndData data)
 Called when game mode ends.
 
void OnPlayerConnected (int playerId)
 Called after a player is connected.
 
void OnPlayerAuditSuccess (int playerId)
 Event is called when player connecting Session hosting current Game Mode where is required authentication verification via.
 
void OnPlayerAuditFail (int playerId)
 Event is called when player connecting Session hosting current Game Mode AuditFail() call may be called under two occasions: 1) verification is required but failed (account is not valid, player is banned, internet issues) 2) player cannot be verified as authentication is not required or possible - where it may be valid behavior (server online connectivity turned off for example) Basically non-audited player cannot access persistency/ etc.
 
void OnPlayerAuditTimeouted (int playerId)
 Event is called when player connected to Session was kicked and did not reconnected in time This mean that slot reservation can be canceled.
 
void OnPlayerAuditRevived (int playerId)
 Event is called when player reconnected successfully back to Session after kick This mean that slot reservation need to be finished (closed).
 
void OnPlayerRegistered (int playerId)
 Called on every machine after a player is registered (identity, name etc.).
 
void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 Called after a player is disconnected.
 
void OnPlayerSpawned (int playerId, IEntity controlledEntity)
 Called after a player is spawned.
 
bool PreparePlayerEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
void OnSpawnPlayerEntityFailure_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnData data, SCR_ESpawnResult reason)
 
void OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
bool HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator)
 See SCR_BaseGameMode.HandlePlayerKilled.
 
void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
 Called after a player gets killed.
 
void OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator)
 Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour.
 
void OnPlayerDeleted (int playerId, IEntity player)
 Called after a player gets deleted.
 
void OnPlayerRoleChange (int playerId, EPlayerRole roleFlags)
 Called when player role changes.
 
void OnWorldPostProcess (World world)
 Called once loading of all entities of the world have been finished (still within the loading)
 
void HandleOnLoadoutAssigned (int playerID, SCR_BasePlayerLoadout assignedLoadout)
 What happens when a player is assigned a loadout.
 
void HandleOnFactionAssigned (int playerID, Faction assignedFaction)
 What happens when a player is assigned a faction.
 
void HandleOnSpawnPointAssigned (int playerID, SCR_SpawnPoint spawnPoint)
 What happens when a player is assigned a spawn point.
 
void OnControllableSpawned (IEntity entity)
 When a controllable entity is spawned, this event is raised.
 
void OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData)
 When a controllable entity is destroyed, this event is raised.
 
void OnControllableDeleted (IEntity entity)
 Prior to a controllable entity being DELETED, this event is raised.
 
void SCR_BaseGameModeComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 

Static Public Member Functions

static SCR_CaptureAndHoldManager GetAreaManager ()
 Finds area manager on current game mode and returns it or null if none.
 

Public Attributes

bool m_bUseCustomWeather
 If enabled custom weather Id will be used on session start. Authority only.
 
string m_sCustomWeatherId
 Weather IDs are the same as used in the TimeAndWeatherManager. Weather set on game start. Authority only.
 
bool m_bUseCustomTime
 If enabled custom time of the day will be used on session start. Authority only.
 
float m_fCustomTimeOfTheDay
 Time of the day set on game start. Authority only.
 
bool m_bPersistentAreaFactions
 If enabled then capture status is persistent.
 

Protected Member Functions

override void OnPostInit (IEntity owner)
 Initializes this manager component and hooks up events.
 
override void OnDelete (IEntity owner)
 Unhooks events.
 
void DoPanZoomMap (float x, float z, float zoom)
 Pans the map to provided world coordinates.
 
void OnMapOpen (MapConfiguration config)
 Finds the average center of all objectives and pans and zooms the map to it.
 
override void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
 Called when provided player dies.
 
void SetWeather (string weatherId)
 Forcefully sets weather to provided weatherId. Authority only.
 
void SetTimeOfTheDay (float timeOfTheDay)
 Forcefully sets time of the day to provided value. Authority only.
 
override void EOnInit (IEntity owner)
 Initialize the manager.
 

Protected Attributes

ref array< SCR_CaptureAndHoldAream_aAreas = {}
 Array of all areas registered within this manager.
 
ref array< SCR_CaptureAndHoldSpawnAream_aSpawnAreas = {}
 Array of all spawn areas registered within this manager.
 
- Protected Attributes inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode m_pGameMode
 The game mode entity this component is attached to.
 

Static Protected Attributes

static SCR_CaptureAndHoldManager s_Instance
 Manager singleton instance, assigned on first get call.
 

Detailed Description

Capture & Hold manager that allows registration and management of areas.

This component must be attached to a SCR_BaseGameMode entity! There should only be a single manager at any given time.

Member Function Documentation

◆ DoPanZoomMap()

void SCR_CaptureAndHoldManager.DoPanZoomMap ( float  x,
float  z,
float  zoom 
)
protected

Pans the map to provided world coordinates.

◆ EOnInit()

override void SCR_CaptureAndHoldManager.EOnInit ( IEntity  owner)
protected

Initialize the manager.

◆ GetArea()

SCR_CaptureAndHoldArea SCR_CaptureAndHoldManager.GetArea ( int  index)

Returns an area at given index.

◆ GetAreaCount()

int SCR_CaptureAndHoldManager.GetAreaCount ( )

Returns the number of registered capture areas.

◆ GetAreaManager()

static SCR_CaptureAndHoldManager SCR_CaptureAndHoldManager.GetAreaManager ( )
static

Finds area manager on current game mode and returns it or null if none.

◆ GetAreas() [1/2]

int SCR_CaptureAndHoldManager.GetAreas ( notnull array< SCR_CaptureAndHoldArea outAreas)

Fills the provided array with all registered zones and returns the count.

◆ GetAreas() [2/2]

int SCR_CaptureAndHoldManager.GetAreas ( notnull array< SCR_CaptureAndHoldSpawnArea outAreas)

Fills the provided array with all registered spawn areas and returns the count.

◆ GetIsAreaFactionPersistent()

bool SCR_CaptureAndHoldManager.GetIsAreaFactionPersistent ( )

Returns true when factions should be persistent, ie.

left unchanged when last player(s) leave the capture area.

◆ GetSpawnArea()

SCR_CaptureAndHoldSpawnArea SCR_CaptureAndHoldManager.GetSpawnArea ( int  index)

Returns a spawn area at given index.

◆ GetSpawnAreaCount()

int SCR_CaptureAndHoldManager.GetSpawnAreaCount ( )

Returns the number of registered spawn areas.

◆ OnDelete()

override void SCR_CaptureAndHoldManager.OnDelete ( IEntity  owner)
protected

Unhooks events.

◆ OnMapOpen()

void SCR_CaptureAndHoldManager.OnMapOpen ( MapConfiguration  config)
protected

Finds the average center of all objectives and pans and zooms the map to it.

◆ OnPlayerKilled()

override void SCR_CaptureAndHoldManager.OnPlayerKilled ( notnull SCR_InstigatorContextData  instigatorContextData)
protected

Called when provided player dies.

Implements SCR_BaseGameModeComponent.

◆ OnPostInit()

override void SCR_CaptureAndHoldManager.OnPostInit ( IEntity  owner)
protected

Initializes this manager component and hooks up events.

◆ RegisterArea()

void SCR_CaptureAndHoldManager.RegisterArea ( SCR_CaptureAndHoldArea  area)

Register a capture area to this manager. Area must be unique.

◆ RegisterSpawnArea()

void SCR_CaptureAndHoldManager.RegisterSpawnArea ( SCR_CaptureAndHoldSpawnArea  spawnArea)

Register a spawn area to this manager. Area must be unique.

◆ SetTimeOfTheDay()

void SCR_CaptureAndHoldManager.SetTimeOfTheDay ( float  timeOfTheDay)
protected

Forcefully sets time of the day to provided value. Authority only.

◆ SetWeather()

void SCR_CaptureAndHoldManager.SetWeather ( string  weatherId)
protected

Forcefully sets weather to provided weatherId. Authority only.

◆ UnregisterArea()

void SCR_CaptureAndHoldManager.UnregisterArea ( SCR_CaptureAndHoldArea  area)

Unregisters a capture area from this manager.

◆ UnregisterSpawnArea()

void SCR_CaptureAndHoldManager.UnregisterSpawnArea ( SCR_CaptureAndHoldSpawnArea  spawnArea)

Unregisters a capture area from this manager.

Member Data Documentation

◆ m_aAreas

ref array<SCR_CaptureAndHoldArea> SCR_CaptureAndHoldManager.m_aAreas = {}
protected

Array of all areas registered within this manager.

◆ m_aSpawnAreas

ref array<SCR_CaptureAndHoldSpawnArea> SCR_CaptureAndHoldManager.m_aSpawnAreas = {}
protected

Array of all spawn areas registered within this manager.

◆ m_bPersistentAreaFactions

bool SCR_CaptureAndHoldManager.m_bPersistentAreaFactions

If enabled then capture status is persistent.

◆ m_bUseCustomTime

bool SCR_CaptureAndHoldManager.m_bUseCustomTime

If enabled custom time of the day will be used on session start. Authority only.

◆ m_bUseCustomWeather

bool SCR_CaptureAndHoldManager.m_bUseCustomWeather

If enabled custom weather Id will be used on session start. Authority only.

◆ m_fCustomTimeOfTheDay

float SCR_CaptureAndHoldManager.m_fCustomTimeOfTheDay

Time of the day set on game start. Authority only.

◆ m_sCustomWeatherId

string SCR_CaptureAndHoldManager.m_sCustomWeatherId

Weather IDs are the same as used in the TimeAndWeatherManager. Weather set on game start. Authority only.

◆ s_Instance

SCR_CaptureAndHoldManager SCR_CaptureAndHoldManager.s_Instance
staticprotected

Manager singleton instance, assigned on first get call.


The documentation for this interface was generated from the following file: