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

Public Member Functions

void SCR_AICommsHandler (notnull IEntity entity, notnull AIAgent agent)
 
void AddRequest (SCR_AITalkRequest request)
 
bool CanBypass (SCR_AITalkRequest request=null)
 Checks if we can optimize out transmitting this, which results in successful completion of request You should call this before creating a talk request and adding it to the queue request - optional, the request which we will check if we can bypass it.
 
void SetMuted (bool mute)
 
bool GetMuted ()
 
void SetSuspended (bool suspended)
 'Suspended' means a sleeping state When switching to suspended state, current request, if exists, is put back into queue.
 
bool GetSuspended ()
 
void Update (float timeSlice)
 
void Reset ()
 Fails and clears all requests, resets to initial state.
 
void EOnDiag (float timeSlice)
 
void ~SCR_AICommsHandler ()
 

Public Attributes

IEntity m_Entity
 
AIAgent m_Agent
 
SignalsManagerComponent m_SignalsManagerComponent
 
VoNComponent m_VoNComponent
 
FactionAffiliationComponent m_FactionComp
 
bool m_bNeedUpdate = false
 

Protected Member Functions

SCR_AITalkRequest FindValidRequest ()
 
void TryTransmitAndSwitchState ()
 Tries to transmit, if succeedes, switches to ACTIVE state, otherwise to WAITING state.
 
bool CanTransmit (SCR_AITalkRequest request)
 Checks if we can transmit with relation to channel state.
 
bool IsChannelFree ()
 Checks if channel is free for transmission.
 
void SwitchToState (SCR_EAICommunicationState newState)
 
void TransmitRequest (SCR_AITalkRequest rq)
 
void FailRequest (SCR_AITalkRequest rq)
 
void CompleteRequest (SCR_AITalkRequest rq)
 
void ClearAndFailAllRequests ()
 Clears and fails all requests.
 

Protected Attributes

ref array< ref SCR_AITalkRequestm_aRequestQueue = {}
 
ref ref SCR_AITalkRequest m_CurrentRequest
 
float m_fActiveTimer_ms
 
SCR_EAICommunicationState m_eState
 
bool m_bMuted
 

Static Protected Attributes

const float SAMPLE_LENGTH_MS = 2000.0
 
const float NEARBY_SPEAKER_CHECK_RANGE = 10.0
 

Constructor & Destructor Documentation

◆ SCR_AICommsHandler()

void SCR_AICommsHandler.SCR_AICommsHandler ( notnull IEntity  entity,
notnull AIAgent  agent 
)

◆ ~SCR_AICommsHandler()

void SCR_AICommsHandler.~SCR_AICommsHandler ( )

Member Function Documentation

◆ AddRequest()

void SCR_AICommsHandler.AddRequest ( SCR_AITalkRequest  request)

◆ CanBypass()

bool SCR_AICommsHandler.CanBypass ( SCR_AITalkRequest  request = null)

Checks if we can optimize out transmitting this, which results in successful completion of request You should call this before creating a talk request and adding it to the queue request - optional, the request which we will check if we can bypass it.

If it's not passed, oinly generic rules are checked.

◆ CanTransmit()

bool SCR_AICommsHandler.CanTransmit ( SCR_AITalkRequest  request)
protected

Checks if we can transmit with relation to channel state.

◆ ClearAndFailAllRequests()

void SCR_AICommsHandler.ClearAndFailAllRequests ( )
protected

Clears and fails all requests.

◆ CompleteRequest()

void SCR_AICommsHandler.CompleteRequest ( SCR_AITalkRequest  rq)
protected

◆ EOnDiag()

void SCR_AICommsHandler.EOnDiag ( float  timeSlice)

◆ FailRequest()

void SCR_AICommsHandler.FailRequest ( SCR_AITalkRequest  rq)
protected

◆ FindValidRequest()

SCR_AITalkRequest SCR_AICommsHandler.FindValidRequest ( )
protected

◆ GetMuted()

bool SCR_AICommsHandler.GetMuted ( )

◆ GetSuspended()

bool SCR_AICommsHandler.GetSuspended ( )

◆ IsChannelFree()

bool SCR_AICommsHandler.IsChannelFree ( )
protected

Checks if channel is free for transmission.

Now it checks nearby characters.

◆ Reset()

void SCR_AICommsHandler.Reset ( )

Fails and clears all requests, resets to initial state.

◆ SetMuted()

void SCR_AICommsHandler.SetMuted ( bool  mute)

◆ SetSuspended()

void SCR_AICommsHandler.SetSuspended ( bool  suspended)

'Suspended' means a sleeping state When switching to suspended state, current request, if exists, is put back into queue.

Requests are not served in suspended state.

◆ SwitchToState()

void SCR_AICommsHandler.SwitchToState ( SCR_EAICommunicationState  newState)
protected

◆ TransmitRequest()

void SCR_AICommsHandler.TransmitRequest ( SCR_AITalkRequest  rq)
protected

◆ TryTransmitAndSwitchState()

void SCR_AICommsHandler.TryTransmitAndSwitchState ( )
protected

Tries to transmit, if succeedes, switches to ACTIVE state, otherwise to WAITING state.

◆ Update()

void SCR_AICommsHandler.Update ( float  timeSlice)

Member Data Documentation

◆ m_Agent

AIAgent SCR_AICommsHandler.m_Agent

◆ m_aRequestQueue

ref array<ref SCR_AITalkRequest> SCR_AICommsHandler.m_aRequestQueue = {}
protected

◆ m_bMuted

bool SCR_AICommsHandler.m_bMuted
protected

◆ m_bNeedUpdate

bool SCR_AICommsHandler.m_bNeedUpdate = false

◆ m_CurrentRequest

ref ref SCR_AITalkRequest SCR_AICommsHandler.m_CurrentRequest
protected

◆ m_Entity

IEntity SCR_AICommsHandler.m_Entity

◆ m_eState

SCR_EAICommunicationState SCR_AICommsHandler.m_eState
protected

◆ m_FactionComp

FactionAffiliationComponent SCR_AICommsHandler.m_FactionComp

◆ m_fActiveTimer_ms

float SCR_AICommsHandler.m_fActiveTimer_ms
protected

◆ m_SignalsManagerComponent

SignalsManagerComponent SCR_AICommsHandler.m_SignalsManagerComponent

◆ m_VoNComponent

VoNComponent SCR_AICommsHandler.m_VoNComponent

◆ NEARBY_SPEAKER_CHECK_RANGE

const float SCR_AICommsHandler.NEARBY_SPEAKER_CHECK_RANGE = 10.0
staticprotected

◆ SAMPLE_LENGTH_MS

const float SCR_AICommsHandler.SAMPLE_LENGTH_MS = 2000.0
staticprotected

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