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

For each faction, holds available companies, which in turn hold available platoons, which in turn hold available squads. More...

Public Member Functions

void SCR_FactionCallsignData (SCR_FactionCallsignInfo factionCallsignInfo)
 
bool GetRandomCallsign (out int company, out int platoon, out int squad)
 Gets company, platoon and squad index randomly from available callsigns Will first go through default companies, if these are all taken then go though overflow companies.
 
bool GetFirstAvailibleCallsign (out int firstAvailableCompany, out int firstAvailablePlatoon, out int firstAvailableSquad)
 Goes through all available companies, platoons and squads and gets the first available.
 
bool GetSpecificCompanyCallsign (out int company, out int platoon, out int squad)
 Gets a callsign for a specific company given.
 
void AddCallsign (int companyIndex, int platoonIndex, int squadIndex)
 Adds callsign back to available callsign pool.
 
void RemoveCallsign (int companyIndex, int platoonIndex, int squadIndex)
 Removes callsign from available callsign pool.
 

Protected Attributes

ref map< int, ref SCR_CallsignCompanyDatam_mCompanyCallsigns = new map<int, ref SCR_CallsignCompanyData>()
 
ref map< int, ref SCR_CallsignCompanyDatam_mCompanyOverflowCallsigns = new map<int, ref SCR_CallsignCompanyData>()
 
int m_iOverflowIndex
 
bool m_bRandomizedCallsigns
 

Detailed Description

For each faction, holds available companies, which in turn hold available platoons, which in turn hold available squads.

Constructor & Destructor Documentation

◆ SCR_FactionCallsignData()

void SCR_FactionCallsignData.SCR_FactionCallsignData ( SCR_FactionCallsignInfo factionCallsignInfo)
Parameters
[in]factionCallsignInfo

Member Function Documentation

◆ AddCallsign()

void SCR_FactionCallsignData.AddCallsign ( int companyIndex,
int platoonIndex,
int squadIndex )

Adds callsign back to available callsign pool.

Parameters
[in]companyIndexcompany index
[in]platoonIndexplatoon index
[in]squadIndexsquad index

◆ GetFirstAvailibleCallsign()

bool SCR_FactionCallsignData.GetFirstAvailibleCallsign ( out int firstAvailableCompany,
out int firstAvailablePlatoon,
out int firstAvailableSquad )

Goes through all available companies, platoons and squads and gets the first available.

Meaning if platoon 1 is taken it will get 2 next not 3. Will first go through default companies, if these are all taken then go though overflow companies

Parameters
[out]firstAvailableCompanycompany index
[out]firstAvailablePlatoonplatoon index
[out]firstAvailableSquadsquadindex
Returns
true if succesfully found a callsign

◆ GetRandomCallsign()

bool SCR_FactionCallsignData.GetRandomCallsign ( out int company,
out int platoon,
out int squad )

Gets company, platoon and squad index randomly from available callsigns Will first go through default companies, if these are all taken then go though overflow companies.

Parameters
[out]companyindex
[out]platoonindex
[out]squadindex
Returns
true if succesfully found a callsign

◆ GetSpecificCompanyCallsign()

bool SCR_FactionCallsignData.GetSpecificCompanyCallsign ( out int company,
out int platoon,
out int squad )

Gets a callsign for a specific company given.

Will however use either GetRandomCallsign or GetFirstAvailibleCallsign (depending on callsign settings) if specific company is not available

Parameters
[out]companycompany index
[out]platoonplatoon index
[out]squadsquad index
Returns
true if successfully found a callsign (either the first available or GetRandomCallsign/GetFirstAvailibleCallsign)

◆ RemoveCallsign()

void SCR_FactionCallsignData.RemoveCallsign ( int companyIndex,
int platoonIndex,
int squadIndex )

Removes callsign from available callsign pool.

Parameters
[in]companyindex
[in]platoonindex
[in]squadindex

Member Data Documentation

◆ m_bRandomizedCallsigns

bool SCR_FactionCallsignData.m_bRandomizedCallsigns
protected

◆ m_iOverflowIndex

int SCR_FactionCallsignData.m_iOverflowIndex
protected

◆ m_mCompanyCallsigns

ref map<int, ref SCR_CallsignCompanyData> SCR_FactionCallsignData.m_mCompanyCallsigns = new map<int, ref SCR_CallsignCompanyData>()
protected

◆ m_mCompanyOverflowCallsigns

ref map<int, ref SCR_CallsignCompanyData> SCR_FactionCallsignData.m_mCompanyOverflowCallsigns = new map<int, ref SCR_CallsignCompanyData>()
protected

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