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

Player <> Game Master communication. More...

Inheritance diagram for SCR_PingEditorComponent:
[legend]

Public Member Functions

void SendPing (bool unlimitedOnly=false, vector position=vector.Zero, SCR_EditableEntityComponent target=null)
 Send ping (If not on cooldown).
 
int GetPlayerPings (out notnull map< int, SCR_EditableEntityComponent > outPlayerPings)
 Get the list of current ping entities.
 
ScriptInvoker GetOnPingSend ()
 Get event called when a ping is sent.
 
ScriptInvoker GetOnPingReceive ()
 Get event called when a ping is received.
 
ScriptInvoker GetOnPingEntityRegister ()
 Get event called when a ping entity is created.
 
ScriptInvoker GetOnPingEntityUnregister ()
 Get event called when a ping entity is removed.
 
bool IsPingOnCooldown ()
 Get if ping is on cooldown (Locally)
 
override void EOnEffect (SCR_BaseEditorEffect effect)
 When an effect is created in reaction an an event.
 
void SCR_PingEditorComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_PingEditorComponent ()
 
- 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 ActivateCooldown ()
 
void UpdateCooldown ()
 
void OnCooldownDone ()
 
void SendPingServer (bool unlimitedOnly, vector position, RplId targetID)
 
void ReceivePing (int reporterID, bool reporterInEditor, SCR_EditableEntityComponent reporterEntity, bool unlimitedOnly, vector position, RplId targetID)
 
void ReceivePingOwner (int reporterID, bool reporterInEditor, bool unlimitedOnly, vector position, RplId targetID)
 
void CallEvents (SCR_EditorManagerEntity manager, bool isReceiver, int reporterID, bool reporterInEditor, bool unlimitedOnly, vector position, SCR_EditableEntityComponent target)
 
void Expire (int reporterID, SCR_EditableEntityComponent pingEntity)
 
- 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 EOnEditorInit ()
 When the entity is created.
 
void EOnEditorDelete ()
 When the entity is destroyed.
 
void EOnEditorRequest (bool isOpen)
 When opening/closing request is sent to server.
 
void EOnEditorOpen ()
 When the editor is opened.
 
void EOnEditorClose ()
 When the editor is closed.
 
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 EOnEditorInitServer ()
 When the entity is created (called on server)
 
void EOnEditorDeleteServer ()
 When the entity is destroyed (called on server)
 
void EOnEditorOpenServer ()
 When the editor is opened (called on server)
 
void EOnEditorOpenServerCallback ()
 When the editor is opened (called on server after async loading finished on client)
 
void EOnEditorCloseServer ()
 When the editor is closed (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

float m_fPingEntityLifetime
 
float m_fCooldownTime
 
float m_fCurrentCooldownTime
 
float m_fCooldownUpdateFreq = 50
 
bool m_bIsOnCooldown
 
SCR_EditorManagerCore m_Core
 
ref map< int, SCR_EditableEntityComponentm_PlayerPings = new map<int, SCR_EditableEntityComponent>
 
SCR_EditableEntityComponent m_LastPingEntity
 
ref ScriptInvoker Event_OnPingSend = new ScriptInvoker
 
ref ScriptInvoker Event_OnPingReceive = new ScriptInvoker
 
ref ScriptInvoker Event_OnPingEntityRegister = new ScriptInvoker
 
ref ScriptInvoker Event_OnPingEntityUnregister = 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

Player <> Game Master communication.

Constructor & Destructor Documentation

◆ SCR_PingEditorComponent()

void SCR_PingEditorComponent.SCR_PingEditorComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)

◆ ~SCR_PingEditorComponent()

void SCR_PingEditorComponent.~SCR_PingEditorComponent ( )

Member Function Documentation

◆ ActivateCooldown()

void SCR_PingEditorComponent.ActivateCooldown ( )
protected

◆ CallEvents()

void SCR_PingEditorComponent.CallEvents ( SCR_EditorManagerEntity  manager,
bool  isReceiver,
int  reporterID,
bool  reporterInEditor,
bool  unlimitedOnly,
vector  position,
SCR_EditableEntityComponent  target 
)
protected

◆ EOnEffect()

override void SCR_PingEditorComponent.EOnEffect ( SCR_BaseEditorEffect  effect)

When an effect is created in reaction an an event.

Implements SCR_BaseEditorComponent.

◆ Expire()

void SCR_PingEditorComponent.Expire ( int  reporterID,
SCR_EditableEntityComponent  pingEntity 
)
protected

◆ GetOnPingEntityRegister()

ScriptInvoker SCR_PingEditorComponent.GetOnPingEntityRegister ( )

Get event called when a ping entity is created.

Called on editor owner.

Returns
Script invoker

◆ GetOnPingEntityUnregister()

ScriptInvoker SCR_PingEditorComponent.GetOnPingEntityUnregister ( )

Get event called when a ping entity is removed.

Called on editor owner.

Returns
Script invoker

◆ GetOnPingReceive()

ScriptInvoker SCR_PingEditorComponent.GetOnPingReceive ( )

Get event called when a ping is received.

Called on machine of every player who has editor opened, apart from the one who sent the ping.

Returns
Script invoker

◆ GetOnPingSend()

ScriptInvoker SCR_PingEditorComponent.GetOnPingSend ( )

Get event called when a ping is sent.

Called only on the machine of whoever sent the ping.

Returns
Script invoker

◆ GetPlayerPings()

int SCR_PingEditorComponent.GetPlayerPings ( out notnull map< int, SCR_EditableEntityComponent outPlayerPings)

Get the list of current ping entities.

Parameters
[out]outPlayerPingsList of player IDs and ping entities
Returns
Number of pings

◆ IsPingOnCooldown()

bool SCR_PingEditorComponent.IsPingOnCooldown ( )

Get if ping is on cooldown (Locally)

Returns
True if the ping is on cooldown and cannot be excecuted

◆ OnCooldownDone()

void SCR_PingEditorComponent.OnCooldownDone ( )
protected

◆ ReceivePing()

void SCR_PingEditorComponent.ReceivePing ( int  reporterID,
bool  reporterInEditor,
SCR_EditableEntityComponent  reporterEntity,
bool  unlimitedOnly,
vector  position,
RplId  targetID 
)
protected

◆ ReceivePingOwner()

void SCR_PingEditorComponent.ReceivePingOwner ( int  reporterID,
bool  reporterInEditor,
bool  unlimitedOnly,
vector  position,
RplId  targetID 
)
protected

◆ SendPing()

void SCR_PingEditorComponent.SendPing ( bool  unlimitedOnly = false,
vector  position = vector::Zero,
SCR_EditableEntityComponent  target = null 
)

Send ping (If not on cooldown).

Parameters
Trueif the ping is unlimited only
positionPinged position
targetPinged target
Returns
Script invoker

◆ SendPingServer()

void SCR_PingEditorComponent.SendPingServer ( bool  unlimitedOnly,
vector  position,
RplId  targetID 
)
protected

◆ UpdateCooldown()

void SCR_PingEditorComponent.UpdateCooldown ( )
protected

Member Data Documentation

◆ Event_OnPingEntityRegister

ref ScriptInvoker SCR_PingEditorComponent.Event_OnPingEntityRegister = new ScriptInvoker
protected

◆ Event_OnPingEntityUnregister

ref ScriptInvoker SCR_PingEditorComponent.Event_OnPingEntityUnregister = new ScriptInvoker
protected

◆ Event_OnPingReceive

ref ScriptInvoker SCR_PingEditorComponent.Event_OnPingReceive = new ScriptInvoker
protected

◆ Event_OnPingSend

ref ScriptInvoker SCR_PingEditorComponent.Event_OnPingSend = new ScriptInvoker
protected

◆ m_bIsOnCooldown

bool SCR_PingEditorComponent.m_bIsOnCooldown
protected

◆ m_Core

SCR_EditorManagerCore SCR_PingEditorComponent.m_Core
protected

◆ m_fCooldownTime

float SCR_PingEditorComponent.m_fCooldownTime
protected

◆ m_fCooldownUpdateFreq

float SCR_PingEditorComponent.m_fCooldownUpdateFreq = 50
protected

◆ m_fCurrentCooldownTime

float SCR_PingEditorComponent.m_fCurrentCooldownTime
protected

◆ m_fPingEntityLifetime

float SCR_PingEditorComponent.m_fPingEntityLifetime
protected

◆ m_LastPingEntity

SCR_EditableEntityComponent SCR_PingEditorComponent.m_LastPingEntity
protected

◆ m_PlayerPings

ref map<int, SCR_EditableEntityComponent> SCR_PingEditorComponent.m_PlayerPings = new map<int, SCR_EditableEntityComponent>
protected

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