Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_PlayersManagerEditorComponent Interface Reference

Manager of editable entities which players control (i.e., their avatars). More...

Inheritance diagram for SCR_PlayersManagerEditorComponent:
[legend]

Public Member Functions

SCR_EditableEntityComponent GetPlayerEntity (int playerID)
 Get editable entity of given player ID.
 
int GetPlayerID (SCR_EditableEntityComponent entity)
 If given editable entity is a player, get its ID.
 
bool IsPossessed (SCR_EditableEntityComponent entity)
 
int GetPlayers (notnull map< int, SCR_EditableEntityComponent > players)
 Extract a list of all players.
 
int GetPlayersCount ()
 Get number of players.
 
void TeleportPlayerToPosition (vector position)
 
void TeleportPlayerToPositionServer (vector position)
 
void TeleportPlayerToPositionOwner (vector position)
 
bool HasLocalPlayerSpawnedOnce ()
 Get m_LocalPlayerHasSpawnedOnce to find out if local player has spawned at least once.
 
ScriptInvoker GetOnDeath ()
 Get script invoker called locally when any player dies.
 
ScriptInvoker GetOnSpawn ()
 Get script invoker called locally when any player (re)spawns.
 
ScriptInvoker GetOnPossessed ()
 Get script invoker called locally when any player starts/stops possessing an entity.
 
ScriptInvoker GetOnConnected ()
 Get script invoker called locally when any player connects.
 
ScriptInvoker GetOnDisconnected ()
 Get script invoker called locally when any player disconnects.
 
void Log ()
 Print out all players' editable entities.
 
override void EOnEditorOpen ()
 When the editor is opened.
 
override void EOnEditorClose ()
 When the editor is closed.
 
override void EOnEditorOpenServerCallback ()
 When the editor is opened (called on server after async loading finished on client)
 
override void EOnEditorCloseServer ()
 When the editor is closed (called on server)
 
override void EOnEditorInit ()
 When the entity is created.
 
override void EOnEditorInitServer ()
 When the entity is created (called on server)
 
override void EOnEditorDeleteServer ()
 When the entity is destroyed (called on server)
 
- Public Member Functions inherited from SCR_BaseEditorComponent
sealed void OnInitBase ()
 
sealed void OnDeleteBase ()
 
sealed void OnRequestBase (bool isOpen)
 
sealed void OnOpenedBase ()
 
sealed void OnClosedBase ()
 
sealed void OnPreActivateBase ()
 
sealed void OnActivateBase ()
 
sealed bool OnActivateAsyncBase (int attempt)
 
sealed void OnPostActivateBase ()
 
sealed void OnDeactivateBase ()
 
sealed void OnPostDeactivateBase ()
 
sealed bool OnDeactivateAsyncBase (int attempt)
 
sealed void OnEffectBase (SCR_BaseEditorEffect effect)
 
SCR_EditorManagerEntity GetManager ()
 Get editor manager this component belongs to.
 
SCR_BaseEditorComponent FindEditorComponent (TypeName type, bool showError=false, bool modeFirst=false)
 Get the editor manager to which this component belongs.
 
EntityComponentPrefabData GetEditorComponentData ()
 Get prefab data of this component.
 
bool IsRemoved ()
 Check if the component is being deleted.
 
void ResetEditorComponent ()
 Reset values controlled by the component.
 
ScriptInvoker GetOnEffect ()
 Get event called when an effect is activated.
 
void InitServer ()
 
void InitOwner ()
 
override void OnPostInit (IEntity owner)
 
void SCR_BaseEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_BaseEditorComponent ()
 

Protected Member Functions

void OnSpawnServer (int playerID, IEntity controlledEntity)
 
void UpdatePlayerGroup (notnull SCR_EditableEntityComponent editableEntity, notnull IEntity controlledEntity, int playerID)
 
void UpdatePlayerFaction (SCR_EditableEntityComponent editableEntity, IEntity controlledEntity)
 
void OnSpawnOwner (int playerID, int entityID)
 
void OnPossessedServer (int playerID, IEntity controlledEntity, IEntity mainEntity, bool isPossessing)
 
void OnPossessedOwner (int playerID, bool isPossessing, int entityID)
 
void OnDeathServer (notnull SCR_InstigatorContextData instigatorContextData)
 
void OnDeathOwner (int playerID, int entityID, int killerID)
 
void OnConnectedServer (int playerID)
 
void OnConnectedOwner (int playerID)
 
void OnDisconnectedServer (int playerID)
 
void OnDisconnectedOwner (int playerID)
 
void StopPosessing ()
 
void OnLimitedChange (bool isLimited)
 
void OnEntityRegistered (SCR_EditableEntityComponent entity)
 
void SetServerHandler (bool toAdd)
 
- Protected Member Functions inherited from SCR_BaseEditorComponent
bool IsOnEditorManager ()
 
bool IsOwner ()
 
bool IsProxy ()
 
bool IsMaster ()
 
bool IsAdmin ()
 
SCR_BaseEditorComponent GetParentComponent ()
 
void SetParentComponent (SCR_BaseEditorComponent parent)
 
void SendNotification (ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero)
 
void EOnEditorDelete ()
 When the entity is destroyed.
 
void EOnEditorRequest (bool isOpen)
 When opening/closing request is sent to server.
 
void EOnEditorPreActivate ()
 Before the component is activated.
 
void EOnEditorActivate ()
 When the component is activated.
 
bool EOnEditorActivateAsync (int attempt)
 When the component is activated.
 
void EOnEditorPostActivate ()
 When the component is activated, but after EOnEditorActivate() function was called in all components.
 
void EOnEditorDeactivate ()
 When the component is deactivated.
 
bool EOnEditorDeactivateAsync (int attempt)
 When the component is deactivated.
 
void EOnEditorPostDeactivate ()
 When the component is deactivated, but after the next mode is activated.
 
void EOnEditorDebug (array< string > debugTexts)
 Every frame while the editor is opened and debug menu is shown.
 
void EOnEffect (SCR_BaseEditorEffect effect)
 When an effect is created in reaction an an event.
 
void EOnEditorOpenServer ()
 When the editor is opened (called on server)
 
void EOnEditorCloseServerCallback ()
 When the editor is closed (called on server after async loading finished on client)
 
void EOnEditorActivateServer ()
 When the component is activated (called on server)
 
void EOnEditorDeactivateServer ()
 When the component is deactivated (called on server)
 

Protected Attributes

ResourceName m_DefaultPlayer
 
ref map< int, SCR_EditableEntityComponentm_MainEntities
 
ref map< int, SCR_EditableEntityComponentm_PossessedEntities
 
bool m_LocalPlayerHasSpawnedOnce = false
 
ref ScriptInvoker Event_OnDeath = new ScriptInvoker
 
ref ScriptInvoker Event_OnSpawn = new ScriptInvoker
 
ref ScriptInvoker Event_OnPossessed = new ScriptInvoker
 
ref ScriptInvoker Event_OnConnected = new ScriptInvoker
 
ref ScriptInvoker Event_OnDisconnected = new ScriptInvoker
 
- Protected Attributes inherited from SCR_BaseEditorComponent
SCR_EditorBaseEntity m_Owner
 
SCR_EditorManagerEntity m_Manager
 
SCR_BaseEditorComponent m_Parent
 
RplComponent m_RplComponent
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_BaseEditorComponent
static Managed GetInstance (TypeName type, bool showError=false, bool modeFirst=false)
 Get the local instance of a component attached on editor manager (SCR_EditorManagerEntity).
 
static Managed GetInstance (SCR_EditorBaseEntity editorManager, TypeName type, bool showError=false)
 Get instance of a component attached on specific editor manager / mode (SCR_EditorBaseEntity).
 
static int GetAllInstances (TypeName type, out notnull array< Managed > outComponents)
 Get component instances on editor manager (SCR_EditorBaseEntity) and all its modes (SCR_EditorModeEntity).
 

Detailed Description

Manager of editable entities which players control (i.e., their avatars).

Member Function Documentation

◆ EOnEditorClose()

override void SCR_PlayersManagerEditorComponent.EOnEditorClose ( )

When the editor is closed.

Implements SCR_BaseEditorComponent.

◆ EOnEditorCloseServer()

override void SCR_PlayersManagerEditorComponent.EOnEditorCloseServer ( )

When the editor is closed (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorDeleteServer()

override void SCR_PlayersManagerEditorComponent.EOnEditorDeleteServer ( )

When the entity is destroyed (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorInit()

override void SCR_PlayersManagerEditorComponent.EOnEditorInit ( )

When the entity is created.

Implements SCR_BaseEditorComponent.

◆ EOnEditorInitServer()

override void SCR_PlayersManagerEditorComponent.EOnEditorInitServer ( )

When the entity is created (called on server)

Implements SCR_BaseEditorComponent.

◆ EOnEditorOpen()

override void SCR_PlayersManagerEditorComponent.EOnEditorOpen ( )

When the editor is opened.

Implements SCR_BaseEditorComponent.

◆ EOnEditorOpenServerCallback()

override void SCR_PlayersManagerEditorComponent.EOnEditorOpenServerCallback ( )

When the editor is opened (called on server after async loading finished on client)

Implements SCR_BaseEditorComponent.

◆ GetOnConnected()

ScriptInvoker SCR_PlayersManagerEditorComponent.GetOnConnected ( )

Get script invoker called locally when any player connects.

Returns
Script invoker

◆ GetOnDeath()

ScriptInvoker SCR_PlayersManagerEditorComponent.GetOnDeath ( )

Get script invoker called locally when any player dies.

Returns
Script invoker

◆ GetOnDisconnected()

ScriptInvoker SCR_PlayersManagerEditorComponent.GetOnDisconnected ( )

Get script invoker called locally when any player disconnects.

Returns
Script invoker

◆ GetOnPossessed()

ScriptInvoker SCR_PlayersManagerEditorComponent.GetOnPossessed ( )

Get script invoker called locally when any player starts/stops possessing an entity.

Returns
Script invoker

◆ GetOnSpawn()

ScriptInvoker SCR_PlayersManagerEditorComponent.GetOnSpawn ( )

Get script invoker called locally when any player (re)spawns.

Returns
Script invoker

◆ GetPlayerEntity()

SCR_EditableEntityComponent SCR_PlayersManagerEditorComponent.GetPlayerEntity ( int  playerID)

Get editable entity of given player ID.

Parameters
playerIDPlayer ID
Returns
Editable entity. Whent he player has none, null is returned.

◆ GetPlayerID()

int SCR_PlayersManagerEditorComponent.GetPlayerID ( SCR_EditableEntityComponent  entity)

If given editable entity is a player, get its ID.

Parameters
entityEditable entity
Returns
Player ID. 0 is returned when the entity is not a player.

◆ GetPlayers()

int SCR_PlayersManagerEditorComponent.GetPlayers ( notnull map< int, SCR_EditableEntityComponent players)

Extract a list of all players.

Parameters
playersMap to be filled with player IDs and editable entities
Returns
Number of entries

◆ GetPlayersCount()

int SCR_PlayersManagerEditorComponent.GetPlayersCount ( )

Get number of players.

Returns
Number of players

◆ HasLocalPlayerSpawnedOnce()

bool SCR_PlayersManagerEditorComponent.HasLocalPlayerSpawnedOnce ( )

Get m_LocalPlayerHasSpawnedOnce to find out if local player has spawned at least once.

Returns
m_LocalPlayerHasSpawnedOnce

◆ IsPossessed()

bool SCR_PlayersManagerEditorComponent.IsPossessed ( SCR_EditableEntityComponent  entity)

◆ Log()

void SCR_PlayersManagerEditorComponent.Log ( )

Print out all players' editable entities.

◆ OnConnectedOwner()

void SCR_PlayersManagerEditorComponent.OnConnectedOwner ( int  playerID)
protected

◆ OnConnectedServer()

void SCR_PlayersManagerEditorComponent.OnConnectedServer ( int  playerID)
protected

◆ OnDeathOwner()

void SCR_PlayersManagerEditorComponent.OnDeathOwner ( int  playerID,
int  entityID,
int  killerID 
)
protected

◆ OnDeathServer()

void SCR_PlayersManagerEditorComponent.OnDeathServer ( notnull SCR_InstigatorContextData  instigatorContextData)
protected

◆ OnDisconnectedOwner()

void SCR_PlayersManagerEditorComponent.OnDisconnectedOwner ( int  playerID)
protected

◆ OnDisconnectedServer()

void SCR_PlayersManagerEditorComponent.OnDisconnectedServer ( int  playerID)
protected

◆ OnEntityRegistered()

void SCR_PlayersManagerEditorComponent.OnEntityRegistered ( SCR_EditableEntityComponent  entity)
protected

◆ OnLimitedChange()

void SCR_PlayersManagerEditorComponent.OnLimitedChange ( bool  isLimited)
protected

◆ OnPossessedOwner()

void SCR_PlayersManagerEditorComponent.OnPossessedOwner ( int  playerID,
bool  isPossessing,
int  entityID 
)
protected

◆ OnPossessedServer()

void SCR_PlayersManagerEditorComponent.OnPossessedServer ( int  playerID,
IEntity  controlledEntity,
IEntity  mainEntity,
bool  isPossessing 
)
protected

◆ OnSpawnOwner()

void SCR_PlayersManagerEditorComponent.OnSpawnOwner ( int  playerID,
int  entityID 
)
protected

◆ OnSpawnServer()

void SCR_PlayersManagerEditorComponent.OnSpawnServer ( int  playerID,
IEntity  controlledEntity 
)
protected

◆ SetServerHandler()

void SCR_PlayersManagerEditorComponent.SetServerHandler ( bool  toAdd)
protected

◆ StopPosessing()

void SCR_PlayersManagerEditorComponent.StopPosessing ( )
protected

◆ TeleportPlayerToPosition()

void SCR_PlayersManagerEditorComponent.TeleportPlayerToPosition ( vector  position)

◆ TeleportPlayerToPositionOwner()

void SCR_PlayersManagerEditorComponent.TeleportPlayerToPositionOwner ( vector  position)

◆ TeleportPlayerToPositionServer()

void SCR_PlayersManagerEditorComponent.TeleportPlayerToPositionServer ( vector  position)

◆ UpdatePlayerFaction()

void SCR_PlayersManagerEditorComponent.UpdatePlayerFaction ( SCR_EditableEntityComponent  editableEntity,
IEntity  controlledEntity 
)
protected

◆ UpdatePlayerGroup()

void SCR_PlayersManagerEditorComponent.UpdatePlayerGroup ( notnull SCR_EditableEntityComponent  editableEntity,
notnull IEntity  controlledEntity,
int  playerID 
)
protected

Member Data Documentation

◆ Event_OnConnected

ref ScriptInvoker SCR_PlayersManagerEditorComponent.Event_OnConnected = new ScriptInvoker
protected

◆ Event_OnDeath

ref ScriptInvoker SCR_PlayersManagerEditorComponent.Event_OnDeath = new ScriptInvoker
protected

◆ Event_OnDisconnected

ref ScriptInvoker SCR_PlayersManagerEditorComponent.Event_OnDisconnected = new ScriptInvoker
protected

◆ Event_OnPossessed

ref ScriptInvoker SCR_PlayersManagerEditorComponent.Event_OnPossessed = new ScriptInvoker
protected

◆ Event_OnSpawn

ref ScriptInvoker SCR_PlayersManagerEditorComponent.Event_OnSpawn = new ScriptInvoker
protected

◆ m_DefaultPlayer

ResourceName SCR_PlayersManagerEditorComponent.m_DefaultPlayer
protected

◆ m_LocalPlayerHasSpawnedOnce

bool SCR_PlayersManagerEditorComponent.m_LocalPlayerHasSpawnedOnce = false
protected

◆ m_MainEntities

ref map<int, SCR_EditableEntityComponent> SCR_PlayersManagerEditorComponent.m_MainEntities
protected

◆ m_PossessedEntities

ref map<int, SCR_EditableEntityComponent> SCR_PlayersManagerEditorComponent.m_PossessedEntities
protected

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