17 override bool GetCallsignNames(out
string company, out
string platoon, out
string squad, out
string character, out
string format)
19 int companyCallsignIndex, platoonCallsignIndex, squadCallsignIndex, characterCallsignNumber, characterRoleCallsignIndex;
20 character =
string.Empty;
22 if (!
GetCallsignIndexes(companyCallsignIndex, platoonCallsignIndex, squadCallsignIndex, characterCallsignNumber, characterRoleCallsignIndex))
31 company = companyCallsignIndex.ToString();
32 platoon = platoonCallsignIndex.ToString();
33 squad = squadCallsignIndex.ToString();
34 character = characterCallsignNumber.ToString();
35 format =
"ERROR %1-%2-%3-%4";
40 company =
m_CallsignInfo.GetCompanyCallsignName(companyCallsignIndex);
41 platoon =
m_CallsignInfo.GetPlatoonCallsignName(platoonCallsignIndex);
45 if (showCharacterCallsign)
47 if (characterRoleCallsignIndex >= 0)
48 character =
m_CallsignInfo.GetCharacterRoleCallsignName(characterRoleCallsignIndex);
50 character = characterCallsignNumber.ToString();
53 format =
m_CallsignInfo.GetCallsignFormat(showCharacterCallsign, characterRoleCallsignIndex);
60 if (m_iCompanyCallsign < 0 || m_iPlatoonCallsign < 0 || m_iSquadCallsign < 0)
68 companyIndex = m_iCompanyCallsign;
69 platoonIndex = m_iPlatoonCallsign;
70 squadIndex = m_iSquadCallsign;
92 if (
m_Faction != faction && faction != null)
94 FactionManager factionManager =
GetGame().GetFactionManager();
97 int factionId = factionManager.GetFactionIndex(faction);
107 if (companyIndex == m_iCompanyCallsign && m_iPlatoonCallsign == platoonIndex && m_iSquadCallsign == squadIndex &&
m_bAloneInGroup == aloneInGroup)
173 super.ClearCallsigns();
192 m_iCompanyCallsign = company;
193 m_iPlatoonCallsign = platoon;
194 m_iSquadCallsign = squad;
206 m_iCompanyCallsign = company;
207 m_iPlatoonCallsign = platoon;
208 m_iSquadCallsign = squad;
256 FactionManager factionManager =
GetGame().GetFactionManager();
260 Faction faction = factionManager.GetFactionByIndex(factionID);
262 if (faction !=
m_Faction && faction != null)
338 SCR_AIGroup playerGroup = groupManager.GetPlayerGroup(playerId);
353 if (playerId <= 0 || m_iPlayerId > 0)
365 writer.WriteInt(m_iCompanyCallsign);
366 writer.WriteInt(m_iPlatoonCallsign);
367 writer.WriteInt(m_iSquadCallsign);
379 int company, platoon, squad, character, role, factionID;
382 reader.ReadInt(company);
383 reader.ReadInt(platoon);
384 reader.ReadInt(squad);
385 reader.ReadInt(character);
386 reader.ReadInt(role);
387 reader.ReadBool(aloneInGroup);
388 reader.ReadInt(factionID);
400 if (!m_bIsServer ||
m_iPlayerId <= 0 || !m_CallsignManager)
ArmaReforgerScripted GetGame()
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
void AssignCallsignNoRoleBroadcast(int company, int platoon, int squad, int character, bool aloneInGroup)
void SetAloneInGroupBroadcast(bool isAloneInGroup)
bool GetCharacterCallsignName(out string characterCallsignName)
void InitPlayerOnServer(int playerId)
void UpdateCharacterRoleCallsign(ERoleCallsign roleCallsignIndex)
void AssignRoleCallsignBroadcast(int role)
void AssignCharacterAndRoleCallsignBroadcast(int character, int role)
void ClearCharacterRoleCallsign()
Called on server only before assigning new role callsign to make sure everything is clear....
ERoleCallsign m_iRoleCallsign
void AssignCallsignBroadcast(int company, int platoon, int squad, int character, int role, bool aloneInGroup)
void UpdateCharacterCallsignAndRole(int characterCallsign, ERoleCallsign roleCallsignIndex)
bool GetIsCharacterAloneInGroup()
int GetCharacterOrRoleCallsignIndex()
SCR_CallsignCharacterComponentClass m_iCharacterCallsign
Component of assigning and storing squad names.
int GetCharacterCallsignIndex()
void SetFactionBroadCast(int factionID)
void GetCharacterAndRoleCallsign(out int character, out int role)
void ~SCR_CallsignCharacterComponent()
void AssignCharacterCallsign(Faction faction, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign role, bool aloneInGroup)
void AssignCharacterCallsignBroadcast(int character)
void OnPlayerCallsignChanged(int playerId, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign characterRole)
ref SCR_FactionCallsignInfo m_CallsignInfo
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
int GetPlayerAndAgentCount(bool checkMasterAndSlaves=false)
Component of assigning and storing squad names.
bool GetCallsignNames(out string company, out string platoon, out string squad, out string character, out string format)
bool GetCallsignIndexes(out int companyIndex, out int platoonIndex, out int squadIndex, out int characterNumber=-1, out ERoleCallsign characterRole=ERoleCallsign.NONE)
proto external GenericEntity GetOwner()
Get owner entity.
bool RplLoad(ScriptBitReader reader)
bool RplSave(ScriptBitWriter writer)
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.