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

Component of assigning and storing squad names. More...

Inheritance diagram for SCR_CallsignGroupComponent:
[legend]

Public Member Functions

override void InitOnServer (IEntity owner)
 
bool IsUniqueRoleInUse (int roleToCheck)
 Check if unique role is in use by Players or AI in group None Unique roles are not checked Will always check Master if group is slave.
 
override bool GetCallsignNames (out string company, out string platoon, out string squad, out string character, out string format)
 Get the callsign names assigned.
 
override bool GetCallsignIndexes (out int companyIndex, out int platoonIndex, out int squadIndex, out int characterNumber=-1, out ERoleCallsign characterRole=ERoleCallsign.NONE)
 Get the callsign indexes assigned.
 
void FactionInit (Faction faction, bool isFactionChange=false)
 On Group init and faction change.
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
void ~SCR_CallsignGroupComponent ()
 
- Public Member Functions inherited from SCR_CallsignBaseComponent
bool GetCallsignNames (out string company, out string platoon, out string squad, out string character, out string format)
 Get the callsign names assigned.
 
bool GetCallsignIndexes (out int companyIndex, out int platoonIndex, out int squadIndex, out int characterNumber=-1, out ERoleCallsign characterRole=ERoleCallsign.NONE)
 Get the callsign indexes assigned.
 
ScriptInvokerBase< SCR_CallsignBaseComponent_OnCallsignChanged > GetOnCallsignChanged ()
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

Protected Member Functions

void OnPlayerAddedToGroup (SCR_AIGroup aiGroup, int playerID)
 
void OnPlayerRemovedFromGroup (SCR_AIGroup aiGroup, int playerID)
 
void OnPlayerLeaderAssigned (int groupID, int playerID)
 
void UpdatePlayerRoles ()
 
void AssignPlayerCallsign (int playerID, int characterCallsign=-1)
 
void UpdateAllCharacterRoleCallsigns ()
 
void OnAILeaderAssigned (AIAgent currentLeader, AIAgent prevLeader)
 
void ReplaceAILeaderRole (AIAgent currentLeader, AIAgent prevLeader)
 
void OnAIAddedToGroup (notnull AIAgent character)
 
void OnAIRemovedFromGroup (SCR_AIGroup group, AIAgent character)
 
void AssignAICallsign (AIAgent character, SCR_CallsignCharacterComponent characterCallsignComponent, int characterCallsign=-1)
 
void MakeAIRoleAvailable (int roleIndex)
 
void AssignGroupCallsign ()
 
void AssignCallsignBroadcast (int company, int platoon, int squad)
 
void OnFactionChanged (Faction faction)
 
- Protected Member Functions inherited from SCR_CallsignBaseComponent
void ClearCallsigns ()
 
bool SetCallsignInfo ()
 
void InitOnServer (IEntity owner)
 

Protected Attributes

bool m_bGroupInitCalled
 
SCR_AIGroup m_Group
 
ref map< int, AIAgent > m_mAICallsigns = new map<int, AIAgent>()
 Keeps track of AI callsigns in group.
 
ref map< int, AIAgent > m_mAIRoleCallsigns = new map<int, AIAgent>()
 Keeps track of specific AI role callsigns in group.
 
ref map< int, int > m_mPlayerCallsigns = new map<int, int>()
 Keeps track of player callsigns in group <Callsign, PlayerID>. Player callsigns never change.
 
ref map< int, int > m_mPlayerRoleCallsigns = new map<int, int>()
 Keeps track of specific AI role callsigns in group. map<RoleID, PlayerID>
 
SCR_AIGroup m_MasterGroup
 
SCR_CallsignGroupComponent m_MasterGroupCallsignComponent
 
- Protected Attributes inherited from SCR_CallsignBaseComponent
Faction m_Faction
 
SCR_FactionCallsignInfo m_CallsignInfo
 
int m_iCompanyCallsign = -1
 
int m_iPlatoonCallsign = -1
 
int m_iSquadCallsign = -1
 
bool m_bIsServer
 
SCR_CallsignManagerComponent m_CallsignManager
 
ref ScriptInvokerBase< SCR_CallsignBaseComponent_OnCallsignChanged > Event_OnCallsignChanged = new ScriptInvokerBase<SCR_CallsignBaseComponent_OnCallsignChanged>()
 

Static Protected Attributes

const int iLEADER_ROLE_CHARACTER_CALLSIGN = 1
 

Detailed Description

Component of assigning and storing squad names.

Constructor & Destructor Documentation

◆ ~SCR_CallsignGroupComponent()

void SCR_CallsignGroupComponent.~SCR_CallsignGroupComponent ( )

Member Function Documentation

◆ AssignAICallsign()

void SCR_CallsignGroupComponent.AssignAICallsign ( AIAgent  character,
SCR_CallsignCharacterComponent  characterCallsignComponent,
int  characterCallsign = -1 
)
protected

◆ AssignCallsignBroadcast()

void SCR_CallsignGroupComponent.AssignCallsignBroadcast ( int  company,
int  platoon,
int  squad 
)
protected

◆ AssignGroupCallsign()

void SCR_CallsignGroupComponent.AssignGroupCallsign ( )
protected

◆ AssignPlayerCallsign()

void SCR_CallsignGroupComponent.AssignPlayerCallsign ( int  playerID,
int  characterCallsign = -1 
)
protected

◆ FactionInit()

void SCR_CallsignGroupComponent.FactionInit ( Faction  faction,
bool  isFactionChange = false 
)

On Group init and faction change.

Parameters
[in]faction
[in]isFactionChange

◆ GetCallsignIndexes()

override bool SCR_CallsignGroupComponent.GetCallsignIndexes ( out int  companyIndex,
out int  platoonIndex,
out int  squadIndex,
out int  characterNumber = -1,
out ERoleCallsign  characterRole = ERoleCallsign::NONE 
)

Get the callsign indexes assigned.

Parameters
[out]companyIndexcompany index. Eg: Company Alpha is index 0 and Beta is index 1
[out]platoonIndexplatoon index. Is an index similar to how Company works.
[out]squadIndexsquad index. Is an index similar to how Company works.
[out]characterNumbercharacter callsign number. This is not an index. Soldier 1 will have character 1. The second soldier in the group will have character 2. Will return -1 if component is on a group
[out]characterRoleCharacter role number, roles can be checked with ERoleCallsign eg: characterRole == ERoleCallsign.SQUAD_LEADER will let you know if the character is a squad leader etc. Will return -1 if component is on a group
Returns
returns false if indexes are not assigned

Implements SCR_CallsignBaseComponent.

◆ GetCallsignNames()

override bool SCR_CallsignGroupComponent.GetCallsignNames ( out string  company,
out string  platoon,
out string  squad,
out string  character,
out string  format 
)

Get the callsign names assigned.

Parameters
[out]companyCompany name
[out]platoonPlatoon name
[out]squadSquad name
[out]characterCharacter name (Optional if callsign assigned to a character). Will return Role name if any role is assigned to the character
[out]formatFormat of callsign
Returns
returns true if names are succesfully found

Implements SCR_CallsignBaseComponent.

◆ InitOnServer()

override void SCR_CallsignGroupComponent.InitOnServer ( IEntity  owner)

◆ IsUniqueRoleInUse()

bool SCR_CallsignGroupComponent.IsUniqueRoleInUse ( int  roleToCheck)

Check if unique role is in use by Players or AI in group None Unique roles are not checked Will always check Master if group is slave.

Parameters
roleToCheckRole to check if it is in use
Returns
true if the role is in use

◆ MakeAIRoleAvailable()

void SCR_CallsignGroupComponent.MakeAIRoleAvailable ( int  roleIndex)
protected

◆ OnAIAddedToGroup()

void SCR_CallsignGroupComponent.OnAIAddedToGroup ( notnull AIAgent  character)
protected

◆ OnAILeaderAssigned()

void SCR_CallsignGroupComponent.OnAILeaderAssigned ( AIAgent  currentLeader,
AIAgent  prevLeader 
)
protected

◆ OnAIRemovedFromGroup()

void SCR_CallsignGroupComponent.OnAIRemovedFromGroup ( SCR_AIGroup  group,
AIAgent  character 
)
protected

◆ OnFactionChanged()

void SCR_CallsignGroupComponent.OnFactionChanged ( Faction  faction)
protected

◆ OnPlayerAddedToGroup()

void SCR_CallsignGroupComponent.OnPlayerAddedToGroup ( SCR_AIGroup  aiGroup,
int  playerID 
)
protected

◆ OnPlayerLeaderAssigned()

void SCR_CallsignGroupComponent.OnPlayerLeaderAssigned ( int  groupID,
int  playerID 
)
protected

◆ OnPlayerRemovedFromGroup()

void SCR_CallsignGroupComponent.OnPlayerRemovedFromGroup ( SCR_AIGroup  aiGroup,
int  playerID 
)
protected

◆ ReplaceAILeaderRole()

void SCR_CallsignGroupComponent.ReplaceAILeaderRole ( AIAgent  currentLeader,
AIAgent  prevLeader 
)
protected

◆ RplLoad()

override bool SCR_CallsignGroupComponent.RplLoad ( ScriptBitReader  reader)

◆ RplSave()

override bool SCR_CallsignGroupComponent.RplSave ( ScriptBitWriter  writer)

◆ UpdateAllCharacterRoleCallsigns()

void SCR_CallsignGroupComponent.UpdateAllCharacterRoleCallsigns ( )
protected

◆ UpdatePlayerRoles()

void SCR_CallsignGroupComponent.UpdatePlayerRoles ( )
protected

Member Data Documentation

◆ iLEADER_ROLE_CHARACTER_CALLSIGN

const int SCR_CallsignGroupComponent.iLEADER_ROLE_CHARACTER_CALLSIGN = 1
staticprotected

◆ m_bGroupInitCalled

bool SCR_CallsignGroupComponent.m_bGroupInitCalled
protected

◆ m_Group

SCR_AIGroup SCR_CallsignGroupComponent.m_Group
protected

◆ m_mAICallsigns

ref map<int, AIAgent> SCR_CallsignGroupComponent.m_mAICallsigns = new map<int, AIAgent>()
protected

Keeps track of AI callsigns in group.

◆ m_mAIRoleCallsigns

ref map<int, AIAgent> SCR_CallsignGroupComponent.m_mAIRoleCallsigns = new map<int, AIAgent>()
protected

Keeps track of specific AI role callsigns in group.

◆ m_MasterGroup

SCR_AIGroup SCR_CallsignGroupComponent.m_MasterGroup
protected

◆ m_MasterGroupCallsignComponent

SCR_CallsignGroupComponent SCR_CallsignGroupComponent.m_MasterGroupCallsignComponent
protected

◆ m_mPlayerCallsigns

ref map<int, int> SCR_CallsignGroupComponent.m_mPlayerCallsigns = new map<int, int>()
protected

Keeps track of player callsigns in group <Callsign, PlayerID>. Player callsigns never change.

◆ m_mPlayerRoleCallsigns

ref map<int, int> SCR_CallsignGroupComponent.m_mPlayerRoleCallsigns = new map<int, int>()
protected

Keeps track of specific AI role callsigns in group. map<RoleID, PlayerID>


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