|
Arma Reforger Script API
|
Capture & Hold manager that allows registration and management of areas. More...
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. | |
| 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 | 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 | 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_CaptureAndHoldArea > | m_aAreas = {} |
| Array of all areas registered within this manager. | |
| ref array< SCR_CaptureAndHoldSpawnArea > | m_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. | |
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.
|
protected |
Pans the map to provided world coordinates.
|
protected |
Initialize the manager.
| SCR_CaptureAndHoldArea SCR_CaptureAndHoldManager.GetArea | ( | int | index | ) |
Returns an area at given index.
| int SCR_CaptureAndHoldManager.GetAreaCount | ( | ) |
Returns the number of registered capture areas.
|
static |
Finds area manager on current game mode and returns it or null if none.
| int SCR_CaptureAndHoldManager.GetAreas | ( | notnull array< SCR_CaptureAndHoldArea > | outAreas | ) |
Fills the provided array with all registered zones and returns the count.
| int SCR_CaptureAndHoldManager.GetAreas | ( | notnull array< SCR_CaptureAndHoldSpawnArea > | outAreas | ) |
Fills the provided array with all registered spawn areas and returns the count.
| bool SCR_CaptureAndHoldManager.GetIsAreaFactionPersistent | ( | ) |
Returns true when factions should be persistent, ie.
left unchanged when last player(s) leave the capture area.
| SCR_CaptureAndHoldSpawnArea SCR_CaptureAndHoldManager.GetSpawnArea | ( | int | index | ) |
Returns a spawn area at given index.
| int SCR_CaptureAndHoldManager.GetSpawnAreaCount | ( | ) |
Returns the number of registered spawn areas.
|
protected |
Unhooks events.
|
protected |
Finds the average center of all objectives and pans and zooms the map to it.
|
protected |
Called when provided player dies.
Implements SCR_BaseGameModeComponent.
|
protected |
Initializes this manager component and hooks up events.
| void SCR_CaptureAndHoldManager.RegisterArea | ( | SCR_CaptureAndHoldArea | area | ) |
Register a capture area to this manager. Area must be unique.
| void SCR_CaptureAndHoldManager.RegisterSpawnArea | ( | SCR_CaptureAndHoldSpawnArea | spawnArea | ) |
Register a spawn area to this manager. Area must be unique.
|
protected |
Forcefully sets time of the day to provided value. Authority only.
|
protected |
Forcefully sets weather to provided weatherId. Authority only.
| void SCR_CaptureAndHoldManager.UnregisterArea | ( | SCR_CaptureAndHoldArea | area | ) |
Unregisters a capture area from this manager.
| void SCR_CaptureAndHoldManager.UnregisterSpawnArea | ( | SCR_CaptureAndHoldSpawnArea | spawnArea | ) |
Unregisters a capture area from this manager.
|
protected |
Array of all areas registered within this manager.
|
protected |
Array of all spawn areas registered within this manager.
| bool SCR_CaptureAndHoldManager.m_bPersistentAreaFactions |
If enabled then capture status is persistent.
| bool SCR_CaptureAndHoldManager.m_bUseCustomTime |
If enabled custom time of the day will be used on session start. Authority only.
| bool SCR_CaptureAndHoldManager.m_bUseCustomWeather |
If enabled custom weather Id will be used on session start. Authority only.
| float SCR_CaptureAndHoldManager.m_fCustomTimeOfTheDay |
Time of the day set on game start. Authority only.
| string SCR_CaptureAndHoldManager.m_sCustomWeatherId |
Weather IDs are the same as used in the TimeAndWeatherManager. Weather set on game start. Authority only.
|
staticprotected |
Manager singleton instance, assigned on first get call.