Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CaptureAndHoldManager.c File Reference

Go to the source code of this file.

Classes

class  SCR_CaptureAndHoldManagerClass

Functions

SCR_CaptureAndHoldManagerClass SCR_BaseGameModeComponentClass Attribute (defvalue:"0", desc:"If enabled, custom weather Id will be used. Authority only.", category:"CaptureAndHold: Environment")] bool m_bUseCustomWeather
 If enabled custom weather Id will be used on session start. Authority only.
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 ()
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.

Variables

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.
ref array< SCR_CaptureAndHoldAream_aAreas = {}
 Array of all areas registered within this manager.
ref array< SCR_CaptureAndHoldSpawnArea > m_aSpawnAreas = {}
 Array of all spawn areas registered within this manager.

Function Documentation

◆ Attribute()

SCR_CaptureAndHoldManagerClass SCR_BaseGameModeComponentClass Attribute ( defvalue:"0" ,
desc:"If enabled,
custom weather Id will be used. Authority only." ,
category:"CaptureAndHold: Environment"  )

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

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.

◆ DoPanZoomMap()

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

Pans the map to provided world coordinates.

Definition at line 157 of file SCR_CaptureAndHoldManager.c.

◆ GetArea()

SCR_CaptureAndHoldArea GetArea ( int index)
protected

Returns an area at given index.

Definition at line 88 of file SCR_CaptureAndHoldManager.c.

◆ GetAreaCount()

int GetAreaCount ( )
protected

Returns the number of registered capture areas.

Definition at line 74 of file SCR_CaptureAndHoldManager.c.

◆ GetAreas() [1/2]

int GetAreas ( notnull array< SCR_CaptureAndHoldArea > outAreas)
protected

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

Definition at line 102 of file SCR_CaptureAndHoldManager.c.

◆ GetAreas() [2/2]

int GetAreas ( notnull array< SCR_CaptureAndHoldSpawnArea > outAreas)
protected

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

Definition at line 115 of file SCR_CaptureAndHoldManager.c.

◆ GetIsAreaFactionPersistent()

bool GetIsAreaFactionPersistent ( )
protected

Returns true when factions should be persistent, ie. left unchanged when last player(s) leave the capture area.

Definition at line 129 of file SCR_CaptureAndHoldManager.c.

◆ GetSpawnArea()

SCR_CaptureAndHoldSpawnArea GetSpawnArea ( int index)
protected

Returns a spawn area at given index.

Definition at line 95 of file SCR_CaptureAndHoldManager.c.

◆ GetSpawnAreaCount()

int GetSpawnAreaCount ( )
protected

Returns the number of registered spawn areas.

Definition at line 81 of file SCR_CaptureAndHoldManager.c.

◆ OnDelete()

override void OnDelete ( IEntity owner)
protected

Unhooks events.

Definition at line 148 of file SCR_CaptureAndHoldManager.c.

◆ OnMapOpen()

void OnMapOpen ( MapConfiguration config)
protected

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

Definition at line 169 of file SCR_CaptureAndHoldManager.c.

◆ OnPlayerKilled()

override void OnPlayerKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Called when provided player dies.

Called after a player gets killed.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Definition at line 205 of file SCR_CaptureAndHoldManager.c.

◆ RegisterArea()

void RegisterArea ( SCR_CaptureAndHoldArea area)
protected

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

Definition at line 42 of file SCR_CaptureAndHoldManager.c.

◆ RegisterSpawnArea()

void RegisterSpawnArea ( SCR_CaptureAndHoldSpawnArea spawnArea)
protected

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

Definition at line 58 of file SCR_CaptureAndHoldManager.c.

◆ SetTimeOfTheDay()

void SetTimeOfTheDay ( float timeOfTheDay)
protected

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

Definition at line 289 of file SCR_CaptureAndHoldManager.c.

◆ SetWeather()

void SetWeather ( string weatherId)
protected

Forcefully sets weather to provided weatherId. Authority only.

Definition at line 265 of file SCR_CaptureAndHoldManager.c.

◆ UnregisterArea()

void UnregisterArea ( SCR_CaptureAndHoldArea area)
protected

Unregisters a capture area from this manager.

Definition at line 49 of file SCR_CaptureAndHoldManager.c.

◆ UnregisterSpawnArea()

void UnregisterSpawnArea ( SCR_CaptureAndHoldSpawnArea spawnArea)
protected

Unregisters a capture area from this manager.

Definition at line 65 of file SCR_CaptureAndHoldManager.c.

Variable Documentation

◆ m_aAreas

ref array<SCR_CaptureAndHoldArea> m_aAreas = {}
protected

Array of all areas registered within this manager.

Definition at line 35 of file SCR_CaptureAndHoldManager.c.

◆ m_aSpawnAreas

ref array<SCR_CaptureAndHoldSpawnArea> m_aSpawnAreas = {}
protected

Array of all spawn areas registered within this manager.

Definition at line 38 of file SCR_CaptureAndHoldManager.c.

◆ m_bPersistentAreaFactions

bool m_bPersistentAreaFactions

If enabled then capture status is persistent.

Definition at line 29 of file SCR_CaptureAndHoldManager.c.

◆ m_bUseCustomTime

bool m_bUseCustomTime

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

Definition at line 21 of file SCR_CaptureAndHoldManager.c.

◆ m_fCustomTimeOfTheDay

float m_fCustomTimeOfTheDay

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

Definition at line 25 of file SCR_CaptureAndHoldManager.c.

◆ m_sCustomWeatherId

string m_sCustomWeatherId

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

Definition at line 17 of file SCR_CaptureAndHoldManager.c.