Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_NightModeGameModeComponent Interface Reference
Inheritance diagram for SCR_NightModeGameModeComponent:
[legend]

Public Member Functions

override void EOnFrame (IEntity owner, float timeSlice)
 
bool IsLocalEditorNightModeEnabled ()
 
void EnableLocalEditorNightMode (bool enable, bool playSound=true)
 Enable local editor night mode Note that enable might fail if the conditions are not met.
 
bool IsGlobalNightModeAllowed ()
 
bool IsGlobalNightModeEnabled ()
 
void EnableGlobalNightMode (bool enable, int nightModeChangerPlayerID=-1)
 Enable global night mode Note that enable might fail if the conditions are not met.
 
bool IsNightModeEnabled ()
 
bool CanEnableNightMode ()
 
ScriptInvokerBool GetOnLocalEditorNightModeEnabledChanged ()
 
ScriptInvokerBool GetOnGlobalNightModeEnabledChanged ()
 
ScriptInvokerBool GetOnNightModeEnabledChanged ()
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
- 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 killer)
 See SCR_BaseGameMode.HandlePlayerKilled.
 
void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 Called after a player gets killed.
 
void OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 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 (IEntity entity, IEntity killerEntity, notnull Instigator killer)
 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)
 

Protected Member Functions

void ToggleLocalNightModeShortcut ()
 
void RPC_EnableGlobalNightMode (bool enable, int nightModeChangerPlayerID)
 
void EnableNightMode (bool enable)
 
void OnEditorOpened ()
 
void OnEditorClosed ()
 
void OnEditorLimitedChanged (bool isLimited)
 
void UpdatePreviewingTimeOrWeather ()
 
void OnWeatherStatePreview (bool preview, string stateName)
 
void OnWindPreview (bool preview, float windSpeed=-1, float windAngleDegrees=-1)
 
void OnDateTimePreview (bool preview, int year=-1, int month=-1, int day=-1, float timeOfTheDay=-1)
 
void OnEditorManagerCreated (SCR_EditorManagerEntity editorManager)
 

Protected Attributes

bool m_bAllowGlobalNightMode
 
float m_fSunStateMaxNightMode
 
int m_iEVValueNormalMode
 
int m_iEVValueNightMode
 
string m_sLocalEditorNightModeToggledSound
 
string m_sToggleLocalNightModeShortcut
 
bool m_bLocalEditorNightModeEnabled
 Can only be true if editor is open and unlimited.
 
bool m_bLocalEditorNightModeOnEditorClose
 Saved local nightmode value when editor is closed to enable it again when opened.
 
bool m_bUnlimitedEditorIsOpen
 
bool m_bGlobalNightModeEnabled
 
bool m_IsPreviewingTimeOrWeather
 If player is locally previewing dateTime or weather and Local nightmode is enabled it will disable local nightmode.
 
float m_fNightModeAlpha = 0
 This is the current nightmode alpha for the transition lerp.
 
bool m_bUpdateEachFrame
 If false it will not update each frame but instead each UPDATE_TICK_IN_SECONDS.
 
float m_fCurrentUpdateTickInSeconds
 Current tick in seconds.
 
BaseWorld m_World
 
TimeAndWeatherManagerEntity m_TimeAndWeatherManager
 
SCR_EditorManagerEntity m_EditorManager
 
BaseWeatherStateTransitionManager m_WeatherStateTransitionManager
 
ref ScriptInvokerBool m_OnLocalEditorNightModeEnabledChanged
 
ref ScriptInvokerBool m_OnGlobalNightModeEnabledChanged
 
ref ScriptInvokerBool m_OnNightModeEnabledChanged
 
- Protected Attributes inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode m_pGameMode
 The game mode entity this component is attached to.
 

Static Protected Attributes

static const float UPDATE_TICK_IN_SECONDS = 1
 Update speed when m_bUpdateEachFrame is false.
 

Member Function Documentation

◆ CanEnableNightMode()

bool SCR_NightModeGameModeComponent.CanEnableNightMode ( )
Returns
true if general night mode can be enabled

◆ EnableGlobalNightMode()

void SCR_NightModeGameModeComponent.EnableGlobalNightMode ( bool  enable,
int  nightModeChangerPlayerID = -1 
)

Enable global night mode Note that enable might fail if the conditions are not met.

Parameters
[in]enableTo enable or not
[in]nightModeChangerPlayerIDIf a player ID is given then a notification is sent to all players if global night mode is enabled/disabled

◆ EnableLocalEditorNightMode()

void SCR_NightModeGameModeComponent.EnableLocalEditorNightMode ( bool  enable,
bool  playSound = true 
)

Enable local editor night mode Note that enable might fail if the conditions are not met.

Parameters
[in]enableTo enable or not
[in]playSoundTo play a sound or not

◆ EnableNightMode()

void SCR_NightModeGameModeComponent.EnableNightMode ( bool  enable)
protected

◆ EOnFrame()

override void SCR_NightModeGameModeComponent.EOnFrame ( IEntity  owner,
float  timeSlice 
)

◆ EOnInit()

override void SCR_NightModeGameModeComponent.EOnInit ( IEntity  owner)

◆ GetOnGlobalNightModeEnabledChanged()

ScriptInvokerBool SCR_NightModeGameModeComponent.GetOnGlobalNightModeEnabledChanged ( )
Returns
ScriptInvoker On Global night mode enabled changed

◆ GetOnLocalEditorNightModeEnabledChanged()

ScriptInvokerBool SCR_NightModeGameModeComponent.GetOnLocalEditorNightModeEnabledChanged ( )
Returns
ScriptInvoker On Local editor night mode enabled changed

◆ GetOnNightModeEnabledChanged()

ScriptInvokerBool SCR_NightModeGameModeComponent.GetOnNightModeEnabledChanged ( )
Returns
ScriptInvoker On Local Editor or Global night mode enabled changed

◆ IsGlobalNightModeAllowed()

bool SCR_NightModeGameModeComponent.IsGlobalNightModeAllowed ( )
Returns
true if scenario allows for global night mode to be enabled

◆ IsGlobalNightModeEnabled()

bool SCR_NightModeGameModeComponent.IsGlobalNightModeEnabled ( )
Returns
true if global night mode is enabled for all players

◆ IsLocalEditorNightModeEnabled()

bool SCR_NightModeGameModeComponent.IsLocalEditorNightModeEnabled ( )
Returns
true if local editor night mode is enabled

◆ IsNightModeEnabled()

bool SCR_NightModeGameModeComponent.IsNightModeEnabled ( )
Returns
true if local editor night mode and/or global night mode is enabled

◆ OnDateTimePreview()

void SCR_NightModeGameModeComponent.OnDateTimePreview ( bool  preview,
int  year = -1,
int  month = -1,
int  day = -1,
float  timeOfTheDay = -1 
)
protected

◆ OnDelete()

override void SCR_NightModeGameModeComponent.OnDelete ( IEntity  owner)

◆ OnEditorClosed()

void SCR_NightModeGameModeComponent.OnEditorClosed ( )
protected

◆ OnEditorLimitedChanged()

void SCR_NightModeGameModeComponent.OnEditorLimitedChanged ( bool  isLimited)
protected

◆ OnEditorManagerCreated()

void SCR_NightModeGameModeComponent.OnEditorManagerCreated ( SCR_EditorManagerEntity  editorManager)
protected

◆ OnEditorOpened()

void SCR_NightModeGameModeComponent.OnEditorOpened ( )
protected

◆ OnPostInit()

override void SCR_NightModeGameModeComponent.OnPostInit ( IEntity  owner)

◆ OnWeatherStatePreview()

void SCR_NightModeGameModeComponent.OnWeatherStatePreview ( bool  preview,
string  stateName 
)
protected

◆ OnWindPreview()

void SCR_NightModeGameModeComponent.OnWindPreview ( bool  preview,
float  windSpeed = -1,
float  windAngleDegrees = -1 
)
protected

◆ RPC_EnableGlobalNightMode()

void SCR_NightModeGameModeComponent.RPC_EnableGlobalNightMode ( bool  enable,
int  nightModeChangerPlayerID 
)
protected

◆ RplLoad()

override bool SCR_NightModeGameModeComponent.RplLoad ( ScriptBitReader  reader)

◆ RplSave()

override bool SCR_NightModeGameModeComponent.RplSave ( ScriptBitWriter  writer)

◆ ToggleLocalNightModeShortcut()

void SCR_NightModeGameModeComponent.ToggleLocalNightModeShortcut ( )
protected

◆ UpdatePreviewingTimeOrWeather()

void SCR_NightModeGameModeComponent.UpdatePreviewingTimeOrWeather ( )
protected

Member Data Documentation

◆ m_bAllowGlobalNightMode

bool SCR_NightModeGameModeComponent.m_bAllowGlobalNightMode
protected

◆ m_bGlobalNightModeEnabled

bool SCR_NightModeGameModeComponent.m_bGlobalNightModeEnabled
protected

◆ m_bLocalEditorNightModeEnabled

bool SCR_NightModeGameModeComponent.m_bLocalEditorNightModeEnabled
protected

Can only be true if editor is open and unlimited.

◆ m_bLocalEditorNightModeOnEditorClose

bool SCR_NightModeGameModeComponent.m_bLocalEditorNightModeOnEditorClose
protected

Saved local nightmode value when editor is closed to enable it again when opened.

◆ m_bUnlimitedEditorIsOpen

bool SCR_NightModeGameModeComponent.m_bUnlimitedEditorIsOpen
protected

◆ m_bUpdateEachFrame

bool SCR_NightModeGameModeComponent.m_bUpdateEachFrame
protected

If false it will not update each frame but instead each UPDATE_TICK_IN_SECONDS.

◆ m_EditorManager

SCR_EditorManagerEntity SCR_NightModeGameModeComponent.m_EditorManager
protected

◆ m_fCurrentUpdateTickInSeconds

float SCR_NightModeGameModeComponent.m_fCurrentUpdateTickInSeconds
protected

Current tick in seconds.

◆ m_fNightModeAlpha

float SCR_NightModeGameModeComponent.m_fNightModeAlpha = 0
protected

This is the current nightmode alpha for the transition lerp.

◆ m_fSunStateMaxNightMode

float SCR_NightModeGameModeComponent.m_fSunStateMaxNightMode
protected

◆ m_iEVValueNightMode

int SCR_NightModeGameModeComponent.m_iEVValueNightMode
protected

◆ m_iEVValueNormalMode

int SCR_NightModeGameModeComponent.m_iEVValueNormalMode
protected

◆ m_IsPreviewingTimeOrWeather

bool SCR_NightModeGameModeComponent.m_IsPreviewingTimeOrWeather
protected

If player is locally previewing dateTime or weather and Local nightmode is enabled it will disable local nightmode.

◆ m_OnGlobalNightModeEnabledChanged

ref ScriptInvokerBool SCR_NightModeGameModeComponent.m_OnGlobalNightModeEnabledChanged
protected

◆ m_OnLocalEditorNightModeEnabledChanged

ref ScriptInvokerBool SCR_NightModeGameModeComponent.m_OnLocalEditorNightModeEnabledChanged
protected

◆ m_OnNightModeEnabledChanged

ref ScriptInvokerBool SCR_NightModeGameModeComponent.m_OnNightModeEnabledChanged
protected

◆ m_sLocalEditorNightModeToggledSound

string SCR_NightModeGameModeComponent.m_sLocalEditorNightModeToggledSound
protected

◆ m_sToggleLocalNightModeShortcut

string SCR_NightModeGameModeComponent.m_sToggleLocalNightModeShortcut
protected

◆ m_TimeAndWeatherManager

TimeAndWeatherManagerEntity SCR_NightModeGameModeComponent.m_TimeAndWeatherManager
protected

◆ m_WeatherStateTransitionManager

BaseWeatherStateTransitionManager SCR_NightModeGameModeComponent.m_WeatherStateTransitionManager
protected

◆ m_World

BaseWorld SCR_NightModeGameModeComponent.m_World
protected

◆ UPDATE_TICK_IN_SECONDS

const float SCR_NightModeGameModeComponent.UPDATE_TICK_IN_SECONDS = 1
staticprotected

Update speed when m_bUpdateEachFrame is false.


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