Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_CallsignCharacterComponent Interface Reference

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

Inheritance diagram for SCR_CallsignCharacterComponent:
SCR_CallsignBaseComponent

Public Member Functions

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 AssignCharacterCallsign (Faction faction, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign role, bool aloneInGroup)
 Called by group, assigns a specific character group index and role (if any assigned) to character within specific group.
 
void UpdateCharacterRoleCallsign (ERoleCallsign roleCallsignIndex)
 Updates the assigned role.
 
void UpdateCharacterCallsignAndRole (int characterCallsign, ERoleCallsign roleCallsignIndex)
 Updates the assigned callsign and role.
 
override void ClearCallsigns ()
 Called on server only before assigning new callsign to make sure everything is clear. Does not broadcast cleared values to players!
 
void ClearCharacterRoleCallsign ()
 Called on server only before assigning new role callsign to make sure everything is clear. It is not broadcast!
 
bool GetIsCharacterAloneInGroup ()
 
int GetCharacterCallsignIndex ()
 Returns the character index (ignoring the role)
 
int GetCharacterOrRoleCallsignIndex ()
 Returns either the character index or, if a role is assigned, it will return the character role index instead.
 
void GetCharacterAndRoleCallsign (out int character, out int role)
 Returns both character index and character role index.
 
bool GetCharacterCallsignName (out string characterCallsignName)
 Returns the character callsign name, this either the character group index or the specific role name.
 
void InitPlayerOnServer (int playerId)
 Called by Callsign Manager.
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
void ~SCR_CallsignCharacterComponent ()
 
- Public Member Functions inherited from SCR_CallsignBaseComponent
ScriptInvokerBase< SCR_CallsignBaseComponent_OnCallsignChanged > GetOnCallsignChanged ()
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

Protected Member Functions

void AssignCallsignBroadcast (int company, int platoon, int squad, int character, int role, bool aloneInGroup)
 
void AssignCallsignNoRoleBroadcast (int company, int platoon, int squad, int character, bool aloneInGroup)
 
void AssignCharacterAndRoleCallsignBroadcast (int character, int role)
 
void AssignCharacterCallsignBroadcast (int character)
 
void AssignRoleCallsignBroadcast (int role)
 
void SetAloneInGroupBroadcast (bool isAloneInGroup)
 
void SetFactionBroadCast (int factionID)
 
void OnPlayerCallsignChanged (int playerId, int companyIndex, int platoonIndex, int squadIndex, int characterNumber, ERoleCallsign characterRole)
 
- Protected Member Functions inherited from SCR_CallsignBaseComponent
bool SetCallsignInfo ()
 
void InitOnServer (IEntity owner)
 

Protected Attributes

int m_iCharacterCallsign = -1
 
ERoleCallsign m_iRoleCallsign = ERoleCallsign.NONE
 
bool m_bAloneInGroup = false
 
int m_iFactioniD = -1
 
int m_iPlayerId = 0
 
- 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>()
 

Detailed Description

Component of assigning and storing squad names.

Constructor & Destructor Documentation

◆ ~SCR_CallsignCharacterComponent()

void SCR_CallsignCharacterComponent.~SCR_CallsignCharacterComponent ( )

Member Function Documentation

◆ AssignCallsignBroadcast()

void SCR_CallsignCharacterComponent.AssignCallsignBroadcast ( int company,
int platoon,
int squad,
int character,
int role,
bool aloneInGroup )
protected

◆ AssignCallsignNoRoleBroadcast()

void SCR_CallsignCharacterComponent.AssignCallsignNoRoleBroadcast ( int company,
int platoon,
int squad,
int character,
bool aloneInGroup )
protected

◆ AssignCharacterAndRoleCallsignBroadcast()

void SCR_CallsignCharacterComponent.AssignCharacterAndRoleCallsignBroadcast ( int character,
int role )
protected

◆ AssignCharacterCallsign()

void SCR_CallsignCharacterComponent.AssignCharacterCallsign ( Faction faction,
int companyIndex,
int platoonIndex,
int squadIndex,
int characterNumber,
ERoleCallsign role,
bool aloneInGroup )

Called by group, assigns a specific character group index and role (if any assigned) to character within specific group.

Parameters
[in]factionFaction of group
[in]companyIndexCompany Index
[in]platoonIndexPlatoon Index
[in]squadIndexSquad Index
[in]characterNumberCharacter number in squad (starts with 1)
[in]roleCharacter role (If any assigned)
[in]aloneInGroupIf character is alone in the group

◆ AssignCharacterCallsignBroadcast()

void SCR_CallsignCharacterComponent.AssignCharacterCallsignBroadcast ( int character)
protected

◆ AssignRoleCallsignBroadcast()

void SCR_CallsignCharacterComponent.AssignRoleCallsignBroadcast ( int role)
protected

◆ ClearCallsigns()

override void SCR_CallsignCharacterComponent.ClearCallsigns ( )

Called on server only before assigning new callsign to make sure everything is clear. Does not broadcast cleared values to players!

Implements SCR_CallsignBaseComponent.

◆ ClearCharacterRoleCallsign()

void SCR_CallsignCharacterComponent.ClearCharacterRoleCallsign ( )

Called on server only before assigning new role callsign to make sure everything is clear. It is not broadcast!

◆ GetCallsignIndexes()

override bool SCR_CallsignCharacterComponent.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_CallsignCharacterComponent.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.

◆ GetCharacterAndRoleCallsign()

void SCR_CallsignCharacterComponent.GetCharacterAndRoleCallsign ( out int character,
out int role )

Returns both character index and character role index.

Parameters
[out]charactergroup index
[out]roleindex

◆ GetCharacterCallsignIndex()

int SCR_CallsignCharacterComponent.GetCharacterCallsignIndex ( )

Returns the character index (ignoring the role)

Returns
character group index

◆ GetCharacterCallsignName()

bool SCR_CallsignCharacterComponent.GetCharacterCallsignName ( out string characterCallsignName)

Returns the character callsign name, this either the character group index or the specific role name.

Parameters
[out]characterCallsignNamethe character Callsign name in string
Returns
if name was succesfully found

◆ GetCharacterOrRoleCallsignIndex()

int SCR_CallsignCharacterComponent.GetCharacterOrRoleCallsignIndex ( )

Returns either the character index or, if a role is assigned, it will return the character role index instead.

Returns
int character group index or role index

◆ GetIsCharacterAloneInGroup()

bool SCR_CallsignCharacterComponent.GetIsCharacterAloneInGroup ( )
Returns
is character alone in group. ALso returns true if not in a group at all

◆ InitPlayerOnServer()

void SCR_CallsignCharacterComponent.InitPlayerOnServer ( int playerId)

Called by Callsign Manager.

Makes sure that player characters listen to On Callsign Changed (Server Only)

Parameters
[in]playerId

◆ OnPlayerCallsignChanged()

void SCR_CallsignCharacterComponent.OnPlayerCallsignChanged ( int playerId,
int companyIndex,
int platoonIndex,
int squadIndex,
int characterNumber,
ERoleCallsign characterRole )
protected

◆ RplLoad()

override bool SCR_CallsignCharacterComponent.RplLoad ( ScriptBitReader reader)

◆ RplSave()

override bool SCR_CallsignCharacterComponent.RplSave ( ScriptBitWriter writer)

◆ SetAloneInGroupBroadcast()

void SCR_CallsignCharacterComponent.SetAloneInGroupBroadcast ( bool isAloneInGroup)
protected

◆ SetFactionBroadCast()

void SCR_CallsignCharacterComponent.SetFactionBroadCast ( int factionID)
protected

◆ UpdateCharacterCallsignAndRole()

void SCR_CallsignCharacterComponent.UpdateCharacterCallsignAndRole ( int characterCallsign,
ERoleCallsign roleCallsignIndex )

Updates the assigned callsign and role.

Called when leader role is assigned as leader is always 1

Parameters
[in]characterCallsigncharacter callsign
[in]roleCallsignIndexrole index

◆ UpdateCharacterRoleCallsign()

void SCR_CallsignCharacterComponent.UpdateCharacterRoleCallsign ( ERoleCallsign roleCallsignIndex)

Updates the assigned role.

Parameters
[in]roleCallsignIndexrole index

Member Data Documentation

◆ m_bAloneInGroup

bool SCR_CallsignCharacterComponent.m_bAloneInGroup = false
protected

◆ m_iCharacterCallsign

int SCR_CallsignCharacterComponent.m_iCharacterCallsign = -1
protected

◆ m_iFactioniD

int SCR_CallsignCharacterComponent.m_iFactioniD = -1
protected

◆ m_iPlayerId

int SCR_CallsignCharacterComponent.m_iPlayerId = 0
protected

◆ m_iRoleCallsign

ERoleCallsign SCR_CallsignCharacterComponent.m_iRoleCallsign = ERoleCallsign.NONE
protected

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