Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Game Mode

Game modes. More...

Data Structures

class  SCR_GameModeSectorControl
 
class  BaseGameModeClass
 
class  RespawnComponentClass
 
class  RespawnSystemComponentClass
 

Functions

void SCR_BaseGameMode_OnPlayerDisconnected (int playerId, KickCauseCode cause=KickCauseCode.NONE, int timeout=-1)
 
BaseGameModeClass GenericEntityClass OnGameStart ()
 Gets called after world is initialized but before first ticks. More...
 
event protected void OnPlayerAuditSuccess (int iPlayerID)
 
event protected void OnPlayerAuditFail (int iPlayerID)
 
event protected void OnPlayerAuditTimeouted (int iPlayerID)
 
event protected void OnPlayerAuditRevived (int iPlayerID)
 
event protected void OnPlayerConnected (int playerId)
 
event protected void OnPlayerRegistered (int playerId)
 Register provided client's respawn timer. More...
 
event protected void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 
event protected void OnPlayerSpawned (int playerId, IEntity controlledEntity)
 
event protected bool HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
event protected void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
event protected void OnControllableSpawned (IEntity entity)
 
event protected void OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator instigator)
 Award additional XP for enemies killed in friendly bases. More...
 
event protected void OnControllableDeleted (IEntity entity)
 
event protected void OnPlayerRoleChange (int playerId, EPlayerRole roleFlags)
 
event void OnWorldPostProcess (World world)
 Event called once loading of all entities of the world have been finished. (still within the loading) More...
 
RespawnComponentClass GameComponentClass NotifySpawn (IEntity spawnedEntity)
 
proto external PlayerController GetPlayerController ()
 
event protected void OnInit (IEntity owner)
 
event protected void OnDelete (IEntity owner)
 
event protected void OnPostInit (IEntity owner)
 Editable Mine. More...
 
event protected void OnDiag (IEntity owner, float timeSlice)
 
event protected void OnFrame (IEntity owner, float timeSlice)
 
RespawnSystemComponentClass GameComponentClass Obsolete ()] proto external GenericEntity DoSpawn(string prefab
 RespawnSystemComponent should be attached to a gamemode to handle player spawning and respawning. More...
 
event protected bool OnRplSave (ScriptBitWriter w)
 
event protected bool OnRplLoad (ScriptBitReader r)
 
event GenericEntity RequestSpawn (int playerId)
 Called when some player controller requests respawn. More...
 

Variables

RespawnSystemComponentClass GameComponentClass vector position
 
RespawnSystemComponentClass GameComponentClass vector vector rotation = "0 0 0")
 

Detailed Description

Game modes.

Function Documentation

◆ GetPlayerController()

proto external PlayerController GetPlayerController ( )

Returns the player controller this respawn component is attached to.

Returns
Examples
C:/tmp/scripts_Arma_Reforger_v1.1.0.42/scripts/Game/GameMode/SCR_GameModeEditor.c.

Definition at line 307 of file SCR_PlayerDeployMenuHandlerComponent.c.

◆ HandlePlayerKilled()

event protected bool HandlePlayerKilled ( int  playerId,
IEntity  playerEntity,
IEntity  killerEntity,
notnull Instigator  killer 
)

Called after a player is killed, but before 'OnPlayerKilled'.

The default behavior is such that this method returns true, therefore each kill is handled automatically, resulting in a 'OnPlayerKilled' callback. When this method is overridden to return false, the callback is not called automatically.

This custom behavior can be used to suppress 'OnPlayerKilled' callbacks in specific scenarios, e.g. when a player is possessing an AI, in which case it might not be desirable to raise this callback, but rather handle the kill manually, by the user: e.g. by returning the player's control of their previous entity.

Return true to handle kill automatically, resulting in an immediate 'OnPlayerKilled' callback, otherwise the kill callback is suppressed, allowing custom user handling.

Parameters
playerIdPlayerId of victim player.
playerEntity of victim player (if any).
killerEntityentity of the instigator. If killerEntity is null, you can use instigator.GetInstigatorEntity() if appropiate.
killerEntity of killer instigator (if any).
Returns
True to handle kill automatically (raise 'OnPlayerKilled'), false to not handle automatically (don't raise).

Definition at line 91 of file BaseGameMode.c.

◆ NotifySpawn()

RespawnComponentClass GameComponentClass NotifySpawn ( IEntity  spawnedEntity)

Respawn component is a component attached to PlayerController serving as interface for communication between the authority and remote clients in respawn system context.

Notify the underlying system that this respawn component has spawned/is taking over the provided entity.

◆ Obsolete()

RespawnSystemComponent should be attached to a gamemode to handle player spawning and respawning.

call to create actual entity from given prefab at given position

Parameters
positionXYZ position in world space
rotationXYZ rotation (pitch, yaw, roll) in world space degrees

◆ OnControllableDeleted()

event protected void OnControllableDeleted ( IEntity  entity)

Prior to a controllable entity being DELETED, this event is raised. Controllable entity is such that has BaseControllerComponent and can be possessed either by a player, an AI or stay unpossessed.

Parameters
[in]entityEntity about to be deleted

Definition at line 122 of file BaseGameMode.c.

◆ OnControllableDestroyed()

event protected void OnControllableDestroyed ( IEntity  entity,
IEntity  killerEntity,
notnull Instigator  killer 
)

Award additional XP for enemies killed in friendly bases.

When a controllable entity is destroyed, this event is raised. Entity is destroyed when DamageManager.OnStateChanged -> EDamageState.Destroyed

Parameters
[in]entityDestroyed entity that raised this event
[in]killerEntityInstigator entity that destroyed our victim
[in]killerInstigator of the kill

Called when weather is set to looping or when weather itself is changed (which auto sets it on looping) This is to make sure the notification, that weather is set, is only called once

Parameters
[in]playerID

Get an list of all killfeed types and the localized name

Parameters
[in]killFeedTypeNameslist of killfeed type and name
Returns
the amount of names in the list

Get an list of all killfeed receive types and the localized name

Parameters
[in]killFeedReceiveTypeNameslist of killfeed receive type and name
Returns
the amount of names in the list
the type of killfeed that is currently displayed

Server set killfeed type

Parameters
[in]killFeedTypenew killfeed type to set
[in]playerNotificationIdadd player ID of player that changed the type to display a notification
Returns
the current killfeed receive type

Server set killfeed receive type

Parameters
[in]receiveKillFeedTypenew killfeed reveive type to set
[in]playerNotificationIdadd player ID of player that changed the type to display a notification

Definition at line 115 of file BaseGameMode.c.

◆ OnControllableSpawned()

event protected void OnControllableSpawned ( IEntity  entity)

When a controllable entity is spawned, this event is raised. Controllable entity is such that has BaseControllerComponent and can be possessed either by a player, an AI or stay unpossessed.

Parameters
entitySpawned entity that raised this event

Definition at line 106 of file BaseGameMode.c.

◆ OnDelete()

event protected void OnDelete ( IEntity  owner)

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Definition at line 538 of file SCR_CampaignBuildingCompositionComponent.c.

◆ OnDiag()

event protected void OnDiag ( IEntity  owner,
float  timeSlice 
)

Called during EOnDiag.

Parameters
ownerEntity this component is attached to. \poaram timeSlice Delta time since last update.

◆ OnFrame()

event protected void OnFrame ( IEntity  owner,
float  timeSlice 
)

Called during EOnFrame.

Parameters
ownerEntity this component is attached to.
timeSliceDelta time since last update.

◆ OnGameStart()

BaseGameModeClass GenericEntityClass OnGameStart ( )

Gets called after world is initialized but before first ticks.

Definition at line 621 of file game.c.

◆ OnInit()

event protected void OnInit ( IEntity  owner)

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Definition at line 523 of file SCR_CharacterCommandHandler_Tests.c.

◆ OnPlayerAuditFail()

event protected 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. related functionality provided by online services.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Definition at line 35 of file BaseGameMode.c.

◆ OnPlayerAuditRevived()

event protected 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).

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Definition at line 47 of file BaseGameMode.c.

◆ OnPlayerAuditSuccess()

event protected void OnPlayerAuditSuccess ( int  playerId)

Event is called when player connecting Session hosting current Game Mode where is required authentication verification via. platform services AuditSuccess() call specifically mean this verification was successful Basically audited player has access to persistency/ etc. related functionality provided by online services.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Definition at line 26 of file BaseGameMode.c.

◆ OnPlayerAuditTimeouted()

event protected 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.

Parameters
[in]playerIdis index of player in game, equal to the one assigned at PlayerController

Definition at line 41 of file BaseGameMode.c.

◆ OnPlayerConnected()

event protected void OnPlayerConnected ( int  playerID)

Called after a player is connected. Server-only.

Parameters
playerIdPlayerId of connected player.
[in]playerIdCalled after a player is connected. Server-only.
[in]playerIdPlayerId of connected player.
[in]playerId

Definition at line 33 of file SCR_LocalPlayerPenalty.c.

◆ OnPlayerDisconnected()

event protected void OnPlayerDisconnected ( int  playerId,
KickCauseCode  cause,
int  timeout 
)

Called after a player is disconnected.

Parameters
playerIdPlayerId of disconnected player.
causeCause code
timeoutKick timeout in seconds (-1 is infinity)

What happens when a player disconnects.

Parameters
[in]playerIDis a unique player identifier that defines which player has disconnected.
[in]cause
[in]timeout

Called after a player is disconnected.

Parameters
[in]playerIdPlayerId of disconnected player.
[in]causeReason player disconnected
[in]timeoutTimeout for when players are allowed to connect again. -1 means Ban without an assigned timeout

What happens when a player disconnects.

Parameters
[in]playerIDis a unique player identifier that defines which player has disconnected.
[in]cause
[in]timeout

Authority: Handle disconnected player.

Parameters
[in]playerId
[in]cause
[in]timeout

Called after a player is disconnected.

Parameters
[in]playerIdPlayerId of disconnected player.
[in]causeReason player disconnected
[in]timeoutTimeout for when players are allowed to connect again. -1 means Ban without an assigned timeout

What happens when a player disconnects.

Parameters
[in]playerIDis a unique player identifier that defines which player has disconnected.
[in]cause
[in]timeout

Authority: Handle disconnected player.

Parameters
[in]playerId
[in]cause
[in]timeout

Definition at line 119 of file SCR_PlayerProfileManagerComponent.c.

◆ OnPlayerKilled()

event protected void OnPlayerKilled ( int  playerId,
IEntity  playerEntity,
IEntity  killerEntity,
notnull Instigator  killer 
)

Called after a player gets killed (but only after 'SCR_HandlePlayerKilled' returns true).

Parameters
playerIdPlayerId of victim player.
playerEntity of victim player if any.
killerEntityentity of the instigator. If killerEntity is null, you can use instigator.GetInstigatorEntity() if appropiate.
killerEntity of killer instigator if any.
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityentity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]killerInstigator of the kill
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityEntity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]killerInstigator of the kill, use type to see if there is any

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityentity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]killerInstigator of the kill
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityEntity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]killerInstigator of the kill, use type to see if there is any

Start respawn timer for provided entity if a player controlled it.

Parameters
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
playerIdPlayerId of victim player.
playerEntity of victim player if any.
killerEntityEntity of killer instigator if any.
killerInstigator of the kill

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityentity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]killerInstigator of the kill
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player.
[in]playerEntityEntity of victim player if any.
[in]killerEntityEntity of killer instigator if any.
[in]killerInstigator of the kill, use type to see if there is any

Start respawn timer for provided entity if a player controlled it.

Parameters
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Called after a player gets killed.

Parameters
playerIdPlayerId of victim player.
playerEntity of victim player if any.
killerEntityEntity of killer instigator if any.
killerInstigator of the kill

Definition at line 513 of file SCR_CampaignFeedbackComponent.c.

◆ OnPlayerRegistered()

event protected void OnPlayerRegistered ( int  playerId)

Register provided client's respawn timer.

Called on every machine after a player is registered (identity, name etc.). Always called after OnPlayerConnected.

Parameters
playerIdPlayerId of registered player.

Called on every machine after a player is registered (identity, name etc.). Always called after OnPlayerConnected.

Parameters
[in]playerIdPlayerId of registered player.

Definition at line 207 of file SCR_RespawnTimerComponent.c.

◆ OnPlayerRoleChange()

event protected void OnPlayerRoleChange ( int  playerId,
EPlayerRole  roleFlags 
)

Called when player role changes.

Parameters
playerIdPlayer whose role is being changed.
roleFlagsRoles as a flags

Definition at line 128 of file BaseGameMode.c.

◆ OnPlayerSpawned()

event protected void OnPlayerSpawned ( int  playerId,
IEntity  controlledEntity 
)

Called after a player is spawned.

Parameters
playerIdPlayerId of spawned player.
controlledEntitySpawned entity for this player.

Called after a player is spawned.

Parameters
[in]playerIdPlayerId of spawned player.
[in]controlledEntitySpawned entity for this player.

Definition at line 32 of file SCR_XPHandlerComponent.c.

◆ OnPostInit()

event protected void OnPostInit ( IEntity  owner)

Editable Mine.

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Returns XP reward skill

Parameters
[in]reward
Returns

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Returns XP reward skill

Parameters
[in]reward
Returns

Editable Mine.

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Returns XP reward skill

Parameters
[in]reward
Returns

Editable Mine.

Initialises the handler by finding necessary dependencies.

Parameters
[in]owner

Initialises the component by finding necessary dependencies.

Parameters
[in]owner

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Returns XP reward skill

Parameters
[in]reward
Returns

Editable Mine.

Initialises the handler by finding necessary dependencies.

Parameters
[in]owner

Initialises the component by finding necessary dependencies.

Parameters
[in]owner

Initialises the component, the consumer and/or the container. Event called after init when all components are initialised.

Parameters
[in]ownerEntity that owns this component.

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Returns XP reward skill

Parameters
[in]reward
Returns

Editable Mine.

Initialises the handler by finding necessary dependencies.

Parameters
[in]owner

Initialises the component by finding necessary dependencies.

Parameters
[in]owner

Initialises the component, the consumer and/or the container. Event called after init when all components are initialised.

Parameters
[in]ownerEntity that owns this component.

Definition at line 72 of file SCR_AIConfigComponent.c.

◆ OnRplLoad()

event protected bool OnRplLoad ( ScriptBitReader  r)

Deserialize data received from server on JIP.

Parameters
rBit reader instance

Definition at line 36 of file RespawnSystemComponent.c.

◆ OnRplSave()

event protected bool OnRplSave ( ScriptBitWriter  w)

Serialize server network data for JIP clients.

Parameters
wBit writer instance

Definition at line 31 of file RespawnSystemComponent.c.

◆ OnWorldPostProcess()

event void OnWorldPostProcess ( World  world)

Event called once loading of all entities of the world have been finished. (still within the loading)

Called once loading of all entities of the world have been finished (still within the loading)

Parameters
[in]worldLoaded world

Definition at line 130 of file BaseGameMode.c.

◆ RequestSpawn()

event GenericEntity RequestSpawn ( int  playerId)

Called when some player controller requests respawn.

Definition at line 43 of file RespawnSystemComponent.c.

◆ SCR_BaseGameMode_OnPlayerDisconnected()

void SCR_BaseGameMode_OnPlayerDisconnected ( int  playerId,
KickCauseCode  cause = KickCauseCode.NONE,
int  timeout = -1 
)

Variable Documentation

◆ position

Definition at line 23 of file RespawnSystemComponent.c.

◆ rotation

RespawnSystemComponentClass GameComponentClass vector vector rotation = "0 0 0")

Definition at line 23 of file RespawnSystemComponent.c.