Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
Game Mode

Classes

class  SCR_GameModeSectorControl
class  BaseGameModeClass
class  RespawnComponentClass
class  RespawnSystemComponentClass

Functions

SCR_BaseGameModeClass BaseGameModeClass 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.
void OnPlayerAuditSuccess (int iPlayerID)
void OnPlayerAuditFail (int iPlayerID)
void OnPlayerAuditTimeouted (int iPlayerID)
void OnPlayerAuditRevived (int iPlayerID)
void OnPlayerConnected (int playerId)
void OnPlayerRegistered (int playerId)
void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
void OnPlayerSpawned (int playerId, IEntity controlledEntity)
bool HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
void OnControllableSpawned (IEntity entity)
void OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator instigator)
void OnControllableDeleted (IEntity entity)
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).
RespawnComponentClass GameComponentClass NotifySpawn (IEntity spawnedEntity)
proto external PlayerController GetPlayerController ()
void OnInit (IEntity owner)
void OnPostInit (IEntity owner)
 Editable Mine.
void OnDiag (IEntity owner, float timeSlice)
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.
bool OnRplSave (ScriptBitWriter w)
bool OnRplLoad (ScriptBitReader r)
event GenericEntity RequestSpawn (int playerId)
 Called when some player controller requests respawn.

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
F:/Games/AReforger/scripts/Game/GameMode/SCR_GameModeEditor.c.

Definition at line 307 of file SCR_PlayerDeployMenuHandlerComponent.c.

◆ HandlePlayerKilled()

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

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

Property groups that allow for replication of only part of the object.

Deprecated
Will be removed in the future (as-if all uses were RplGroup.Mandatory).

Definition at line 1 of file EnNetwork.c.

◆ OnControllableDeleted()

void OnControllableDeleted ( IEntity entity)
protected

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()

void OnControllableDestroyed ( IEntity entity,
IEntity killerEntity,
notnull Instigator instigator )
protected

Definition at line 115 of file BaseGameMode.c.

◆ OnControllableSpawned()

void OnControllableSpawned ( IEntity entity)
protected

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

When a controllable entity is spawned, this event is raised.

Parameters
[in]entitySpawned entity that raised this event

Definition at line 106 of file BaseGameMode.c.

◆ OnDiag()

void OnDiag ( IEntity owner,
float timeSlice )
protected

Called during EOnDiag.

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

◆ OnFrame()

void OnFrame ( IEntity owner,
float timeSlice )
protected

Called during EOnFrame.

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

Definition at line 1466 of file SCR_VehicleDamageManagerComponent.c.

◆ OnGameStart()

BaseGameModeClass GenericEntityClass OnGameStart ( )

Gets called after world is initialized but before first ticks.

Definition at line 561 of file game.c.

◆ OnInit()

void OnInit ( IEntity owner)
protected

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Definition at line 493 of file SCR_CharacterCommandHandler_Tests.c.

◆ OnPlayerAuditFail()

void OnPlayerAuditFail ( int playerId)
protected

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()

void OnPlayerAuditRevived ( int playerId)
protected

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()

void OnPlayerAuditSuccess ( int playerId)
protected

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()

void OnPlayerAuditTimeouted ( int playerId)
protected

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()

void OnPlayerConnected ( int playerId)
protected

Called after a player is connected. Server-only.

Parameters
playerIdPlayerId of connected player.
[in]playerId

Called after a player is connected. Server-only.

Parameters
[in]playerIdPlayerId of connected player.

Definition at line 33 of file SCR_LocalPlayerPenalty.c.

◆ OnPlayerDisconnected()

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

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

Definition at line 87 of file SCR_PlayerProfileManagerComponent.c.

◆ OnPlayerKilled()

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

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.

Called after a player gets killed.

Parameters
[in]playerIdPlayerId of victim player
[in]playerEntity of victim player if any
[in]killerEntityEntity of killer instigator if any
[in]killerinstigator of the kill

Definition at line 335 of file SCR_GameModeCleanSweep.c.

◆ OnPlayerRegistered()

void OnPlayerRegistered ( int playerId)
protected

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 934 of file SCR_VotingManagerComponent.c.

◆ OnPlayerRoleChange()

void OnPlayerRoleChange ( int playerId,
EPlayerRole roleFlags )
protected

Called when player role changes.

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

Called when player role changes.

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

Definition at line 128 of file BaseGameMode.c.

◆ OnPlayerSpawned()

void OnPlayerSpawned ( int playerId,
IEntity controlledEntity )
protected

Called after a player is spawned.

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

Definition at line 31 of file SCR_VehicleDebug.c.

◆ OnPostInit()

void OnPostInit ( IEntity owner)
protected

Editable Mine.

Called after all components are initialized.

Parameters
ownerEntity this component is attached to.

Definition at line 47 of file SCR_AICharacterSettingsComponent.c.

◆ OnRplLoad()

bool OnRplLoad ( ScriptBitReader r)
protected

Deserialize data received from server on JIP.

Parameters
rBit reader instance

Definition at line 36 of file RespawnSystemComponent.c.

◆ OnRplSave()

bool OnRplSave ( ScriptBitWriter w)
protected

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

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

Called when some player controller requests respawn.

Definition at line 44 of file RespawnSystemComponent.c.

◆ SCR_BaseGameMode_OnPlayerDisconnected()

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

Variable Documentation

◆ position

◆ rotation