Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SCR_CallsignManagerComponent Interface Reference
Inheritance diagram for SCR_CallsignManagerComponent:
[legend]

Public Member Functions

bool GetEntityCallsignIndexes (IEntity entity, out int companyCallsignIndex, out int platoonCallsignIndex, out int squadCallsignIndex, out int characterCallsignIndex)
 Get the callsign indexes assigned to entity.
 
bool GetEntityCallsignIndexes (SCR_EditableEntityComponent editableEntity, out int companyCallsignIndex, out int platoonCallsignIndex, out int squadCallsignIndex, out int characterCallsignIndex)
 Get the callsign indexes assigned to entity.
 
bool GetEntityCallsignNames (IEntity entity, out string companyCallsignName, out string platoonCallsignName, out string squadCallsignName, out string characterCallsignName, out string format)
 Get the callsign names assigned to entity.
 
bool GetEntityCallsignNames (SCR_EditableEntityComponent editableEntity, out string companyCallsignName, out string platoonCallsignName, out string squadCallsignName, out string characterCallsignName, out string format)
 Get the callsign names assigned to editableEntity.
 
void AssignCallGroupCallsign (Faction faction, SCR_CallsignGroupComponent masterCallsignComponent, out int companyIndex, out int platoonIndex, out int squadIndex)
 Uses the faction to get available company, platoon and squad index and makes these unavailable so they are not picked until available again.
 
void AssignRandomGroupCallsigns (Faction faction, out int companyIndex, out int platoonIndex, out int squadIndex)
 
void MakeGroupCallsignAvailible (Faction faction, int companyIndex, int platoonIndex, int squadIndex)
 Makes the given callsign indexes available again for the faction.
 
void SetPlayerCallsign (int playerId, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign characterRole=ERoleCallsign.NONE)
 
bool GetPlayerCallsign (int playerId, out int companyIndex, out int platoonIndex, out int squadIndex, out int characterNumber=-1, out ERoleCallsign characterRole=ERoleCallsign.NONE)
 
ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > GetOnPlayerCallsignChanged ()
 Returns ScriptInvoker on player callsign changed.
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
void ~SCR_CallsignManagerComponent ()
 
- Public Member Functions inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode GetGameMode ()
 
void OnGameEnd ()
 Called on all machines when the world ends.
 
void OnGameStateChanged (SCR_EGameModeState state)
 Called when game mode state changes called on all machines.
 
void OnGameModeStart ()
 Called on every machine when game mode starts.
 
void OnGameModeEnd (SCR_GameModeEndData data)
 Called when game mode ends.
 
void OnPlayerConnected (int playerId)
 Called after a player is connected.
 
void OnPlayerAuditSuccess (int playerId)
 Event is called when player connecting Session hosting current Game Mode where is required authentication verification via.
 
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.
 
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.
 
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).
 
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 PreparePlayerEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
void OnSpawnPlayerEntityFailure_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnData data, SCR_ESpawnResult reason)
 
void OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
 
bool HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 See SCR_BaseGameMode.HandlePlayerKilled.
 
void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 Called after a player gets killed.
 
void OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour.
 
void OnPlayerDeleted (int playerId, IEntity player)
 Called after a player gets deleted.
 
void OnPlayerRoleChange (int playerId, EPlayerRole roleFlags)
 Called when player role changes.
 
void OnWorldPostProcess (World world)
 Called once loading of all entities of the world have been finished (still within the loading)
 
void HandleOnLoadoutAssigned (int playerID, SCR_BasePlayerLoadout assignedLoadout)
 What happens when a player is assigned a loadout.
 
void HandleOnFactionAssigned (int playerID, Faction assignedFaction)
 What happens when a player is assigned a faction.
 
void HandleOnSpawnPointAssigned (int playerID, SCR_SpawnPoint spawnPoint)
 What happens when a player is assigned a spawn point.
 
void OnControllableSpawned (IEntity entity)
 When a controllable entity is spawned, this event is raised.
 
void OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator killer)
 When a controllable entity is destroyed, this event is raised.
 
void OnControllableDeleted (IEntity entity)
 Prior to a controllable entity being DELETED, this event is raised.
 
void SCR_BaseGameModeComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 

Public Attributes

SCR_GroupsManagerComponent m_GroupManager
 

Protected Member Functions

void AssignFirstAvailableGroupCallsign (Faction faction, out int companyIndex, out int platoonIndex, out int squadIndex)
 
void AssignCompanySpecificGroupCallsign (Faction faction, out int specificCompanyIndex, out int platoonIndex, out int squadIndex)
 
void RemoveAvailableGroupCallsign (Faction faction, int companyIndex, int platoonIndex, int squadIndex)
 
void AssignRandomDuplicateCallsign (Faction faction, out int company, out int platoon, out int squad)
 If all callsigns are taken then assign a random callsign. This is an edge case safety as otherwise entities will be without callsigns.
 
void OnPlayerSpawn (int playerId, IEntity playerEntity)
 Assign callsign for players when they are spawned (Server Only)
 
void OnPlayerLeftGame (int playerId)
 
void FillAvailableCallsigns ()
 

Protected Attributes

ref map< Faction, ref SCR_FactionCallsignDatam_mAvailableCallsigns = new map<Faction, ref SCR_FactionCallsignData>
 All available callsigns are stored here.
 
ref array< ref array< int > > m_aDuplicateCallsigns = {}
 Assigned Duplicate callsigns. If all callsigns are assigned then this stores any assigned dupplicates.
 
ref map< int, ref SCR_PlayerCallsignDatam_mPlayerCallsignData = new map<int, ref SCR_PlayerCallsignData>
 Holds all the callsigns that are assigned to players.
 
ref ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > m_OnPlayerCallsignChanged = new ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged>()
 
- Protected Attributes inherited from SCR_BaseGameModeComponent
SCR_BaseGameMode m_pGameMode
 The game mode entity this component is attached to.
 

Constructor & Destructor Documentation

◆ ~SCR_CallsignManagerComponent()

void SCR_CallsignManagerComponent.~SCR_CallsignManagerComponent ( )

Member Function Documentation

◆ AssignCallGroupCallsign()

void SCR_CallsignManagerComponent.AssignCallGroupCallsign ( Faction  faction,
SCR_CallsignGroupComponent  masterCallsignComponent,
out int  companyIndex,
out int  platoonIndex,
out int  squadIndex 
)

Uses the faction to get available company, platoon and squad index and makes these unavailable so they are not picked until available again.

Parameters
[in]factionfaction to assign callsigns
[out]companyIndexto assign
[out]platoonIndexto assign
[out]squadIndexto assign

◆ AssignCompanySpecificGroupCallsign()

void SCR_CallsignManagerComponent.AssignCompanySpecificGroupCallsign ( Faction  faction,
out int  specificCompanyIndex,
out int  platoonIndex,
out int  squadIndex 
)
protected

◆ AssignFirstAvailableGroupCallsign()

void SCR_CallsignManagerComponent.AssignFirstAvailableGroupCallsign ( Faction  faction,
out int  companyIndex,
out int  platoonIndex,
out int  squadIndex 
)
protected

◆ AssignRandomDuplicateCallsign()

void SCR_CallsignManagerComponent.AssignRandomDuplicateCallsign ( Faction  faction,
out int  company,
out int  platoon,
out int  squad 
)
protected

If all callsigns are taken then assign a random callsign. This is an edge case safety as otherwise entities will be without callsigns.

◆ AssignRandomGroupCallsigns()

void SCR_CallsignManagerComponent.AssignRandomGroupCallsigns ( Faction  faction,
out int  companyIndex,
out int  platoonIndex,
out int  squadIndex 
)
Parameters
[in]faction
[out]companyIndex
[out]platoonIndex
[out]squadIndex

◆ EOnInit()

override void SCR_CallsignManagerComponent.EOnInit ( IEntity  owner)

◆ FillAvailableCallsigns()

void SCR_CallsignManagerComponent.FillAvailableCallsigns ( )
protected

◆ GetEntityCallsignIndexes() [1/2]

bool SCR_CallsignManagerComponent.GetEntityCallsignIndexes ( IEntity  entity,
out int  companyCallsignIndex,
out int  platoonCallsignIndex,
out int  squadCallsignIndex,
out int  characterCallsignIndex 
)

Get the callsign indexes assigned to entity.

Parameters
[in]entityIEntity to get callsign off
[out]companyindex
[out]platoonindex
[out]squadindex
[out]characterindex, either role or character index, will return -1 if not a character
Returns
bool returns false if indexes are not assigned

◆ GetEntityCallsignIndexes() [2/2]

bool SCR_CallsignManagerComponent.GetEntityCallsignIndexes ( SCR_EditableEntityComponent  editableEntity,
out int  companyCallsignIndex,
out int  platoonCallsignIndex,
out int  squadCallsignIndex,
out int  characterCallsignIndex 
)

Get the callsign indexes assigned to entity.

Parameters
[in]editableEntitySCR_EditableEntityComponent to get callsign off
[out]companyindex
[out]platoonindex
[out]squadindex
[out]characterindex, either role or character index, will return -1 if not a character
Returns
bool returns false if indexes are not assigned

◆ GetEntityCallsignNames() [1/2]

bool SCR_CallsignManagerComponent.GetEntityCallsignNames ( IEntity  entity,
out string  companyCallsignName,
out string  platoonCallsignName,
out string  squadCallsignName,
out string  characterCallsignName,
out string  format 
)

Get the callsign names assigned to entity.

Parameters
[in]entityIEntity to get callsign off
[out]companyname
[out]platoonname
[out]squadname
[out]charactername (Optinal if callsign assigned to a character)
[out]format
Returns
bool returns true if names are succesfully found

◆ GetEntityCallsignNames() [2/2]

bool SCR_CallsignManagerComponent.GetEntityCallsignNames ( SCR_EditableEntityComponent  editableEntity,
out string  companyCallsignName,
out string  platoonCallsignName,
out string  squadCallsignName,
out string  characterCallsignName,
out string  format 
)

Get the callsign names assigned to editableEntity.

Parameters
[in]editableEntitySCR_EditableEntityComponent to get callsign off
[out]companyname
[out]platoonname
[out]squadname
[out]charactername (Optinal if callsign assigned to a character)
[out]format
Returns
bool returns true if names are succesfully found

◆ GetOnPlayerCallsignChanged()

ScriptInvokerBase< SCR_GroupsManagerComponent_OnPlayerCallsignChanged > SCR_CallsignManagerComponent.GetOnPlayerCallsignChanged ( )

Returns ScriptInvoker on player callsign changed.

◆ GetPlayerCallsign()

bool SCR_CallsignManagerComponent.GetPlayerCallsign ( int  playerId,
out int  companyIndex,
out int  platoonIndex,
out int  squadIndex,
out int  characterNumber = -1,
out ERoleCallsign  characterRole = ERoleCallsign::NONE 
)
Parameters
[in]playerId
[out]companyIndex
[out]platoonIndex
[out]squadIndex
[out]characterNumber
[out]characterRole
Returns
success or failure in obtaining data

◆ MakeGroupCallsignAvailible()

void SCR_CallsignManagerComponent.MakeGroupCallsignAvailible ( Faction  faction,
int  companyIndex,
int  platoonIndex,
int  squadIndex 
)

Makes the given callsign indexes available again for the faction.

Called when the entity with the callsign is destroyed or switches factions

Parameters
[in]factionfaction of callsigns
[in]companyIndexto make available
[in]platoonIndexto make available
[in]squadIndexto make available

◆ OnPlayerLeftGame()

void SCR_CallsignManagerComponent.OnPlayerLeftGame ( int  playerId)
protected

◆ OnPlayerSpawn()

void SCR_CallsignManagerComponent.OnPlayerSpawn ( int  playerId,
IEntity  playerEntity 
)
protected

Assign callsign for players when they are spawned (Server Only)

◆ OnPostInit()

override void SCR_CallsignManagerComponent.OnPostInit ( IEntity  owner)

◆ RemoveAvailableGroupCallsign()

void SCR_CallsignManagerComponent.RemoveAvailableGroupCallsign ( Faction  faction,
int  companyIndex,
int  platoonIndex,
int  squadIndex 
)
protected

◆ SetPlayerCallsign()

void SCR_CallsignManagerComponent.SetPlayerCallsign ( int  playerId,
int  companyIndex,
int  platoonIndex,
int  squadIndex,
int  characterNumber,
ERoleCallsign  characterRole = ERoleCallsign::NONE 
)
Parameters
[in]playerId
[in]companyIndex
[in]platoonIndex
[in]squadIndex
[in]characterNumber
[in]characterRole

Member Data Documentation

◆ m_aDuplicateCallsigns

ref array<ref array<int> > SCR_CallsignManagerComponent.m_aDuplicateCallsigns = {}
protected

Assigned Duplicate callsigns. If all callsigns are assigned then this stores any assigned dupplicates.

◆ m_GroupManager

SCR_GroupsManagerComponent SCR_CallsignManagerComponent.m_GroupManager

◆ m_mAvailableCallsigns

ref map<Faction, ref SCR_FactionCallsignData> SCR_CallsignManagerComponent.m_mAvailableCallsigns = new map<Faction, ref SCR_FactionCallsignData>
protected

All available callsigns are stored here.

◆ m_mPlayerCallsignData

ref map<int, ref SCR_PlayerCallsignData> SCR_CallsignManagerComponent.m_mPlayerCallsignData = new map<int, ref SCR_PlayerCallsignData>
protected

Holds all the callsigns that are assigned to players.

◆ m_OnPlayerCallsignChanged

ref ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged> SCR_CallsignManagerComponent.m_OnPlayerCallsignChanged = new ScriptInvokerBase<SCR_GroupsManagerComponent_OnPlayerCallsignChanged>()
protected

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