|
Arma Reforger Script API
|
Public Member Functions | |
| void | OnWorldPostProcess (World world) |
| Event called once loading of all entities of the world have been finished. (still within the loading) | |
Protected Member Functions | |
| void | 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) |
| Called after a player is connected. | |
| 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 | HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer) |
| Called after a player is killed, but before 'OnPlayerKilled'. | |
| void | OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer) |
| Called after a player gets killed (but only after 'SCR_HandlePlayerKilled' returns true). | |
| void | OnControllableSpawned (IEntity entity) |
| When a controllable entity is spawned, this event is raised. | |
| void | OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator instigator) |
| void | OnControllableDeleted (IEntity entity) |
| void | OnPlayerRoleChange (int playerId, EPlayerRole roleFlags) |
| Called when player role changes. | |
|
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.
| playerId | PlayerId of victim player. |
| player | Entity of victim player (if any). |
| killerEntity | entity of the instigator. If killerEntity is null, you can use instigator.GetInstigatorEntity() if appropiate. |
| killer | Entity of killer instigator (if any). |
Implemented in SCR_BaseGameMode.
|
protected |
Implemented in SCR_BaseGameMode.
|
protected |
Implemented in SCR_BaseGameMode, and SCR_GameModeLastStand.
|
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.
| entity | Spawned entity that raised this event |
Implemented in SCR_BaseGameMode.
|
protected |
Gets called after world is initialized but before first ticks.
Implemented in SCR_BaseGameMode, SCR_GameModeCampaign, and SCR_GameModeEditor.
|
protected |
Implemented in SCR_BaseGameMode.
|
protected |
Implemented in SCR_BaseGameMode.
|
protected |
Implemented in SCR_BaseGameMode, and SCR_GameModeCampaign.
|
protected |
Implemented in SCR_BaseGameMode.
|
protected |
Called after a player is connected.
Server-only.
| playerId | PlayerId of connected player. |
Implemented in SCR_BaseGameMode.
|
protected |
Called after a player is disconnected.
| playerId | PlayerId of disconnected player. |
| cause | Cause code |
| timeout | Kick timeout in seconds (-1 is infinity) |
Implemented in SCR_BaseGameMode, SCR_GameModeCampaign, and SCR_GameModeCleanSweep.
|
protected |
Called after a player gets killed (but only after 'SCR_HandlePlayerKilled' returns true).
| playerId | PlayerId of victim player. |
| player | Entity of victim player if any. |
| killerEntity | entity of the instigator. If killerEntity is null, you can use instigator.GetInstigatorEntity() if appropiate. |
| killer | Entity of killer instigator if any. |
Implemented in SCR_BaseGameMode, SCR_GameModeCleanSweep, and SCR_GameModeEditor.
|
protected |
Called on every machine after a player is registered (identity, name etc.).
Always called after OnPlayerConnected.
| playerId | PlayerId of registered player. |
Implemented in SCR_BaseGameMode, SCR_GameModeCampaign, and SCR_GameModeCleanSweep.
|
protected |
Called when player role changes.
| playerId | Player whose role is being changed. |
| roleFlags | Roles as a flags |
Implemented in SCR_BaseGameMode.
|
protected |
Called after a player is spawned.
| playerId | PlayerId of spawned player. |
| controlledEntity | Spawned entity for this player. |
| void BaseGameMode.OnWorldPostProcess | ( | World | world | ) |
Event called once loading of all entities of the world have been finished. (still within the loading)
Implemented in SCR_BaseGameMode.