Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CharacterTriggerEntity.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_CharacterTriggerEntityClass
 
class  SCR_CharacterTriggerEntity
 
class  SCR_CustomTriggerConditionsSpecificPrefabCount
 

Typedefs

typedef func ScriptInvokerTriggerUpdated
 

Functions

SCR_CharacterTriggerEntityClass SCR_BaseTriggerEntityClass ScriptInvokerTriggerUpdated (float activationCountdownTimer, float tempWaitTime, int playersCountByFactionInside, int playersCountByFaction, string playerActivationNotificationTitle, bool triggerConditionsStatus, float minimumPlayersNeededPercentage)
 
SCR_CharacterTriggerEntity SCR_BaseTriggerEntity BaseContainerProps ()] class SCR_CustomTriggerConditions
 
void SetActivationPresence (TA_EActivationPresence EActivationPresence)
 Sets Activation Presence. More...
 
void SetSpecificClassName (array< string > aClassName)
 Sets specific classnames to be searched in the trigger. More...
 
void SetPrefabFilters (array< ref SCR_ScenarioFrameworkPrefabFilter > aPrefabFilter)
 Sets specific prefab filters to be searched in the trigger. More...
 
void SetSearchVehicleInventory (bool search)
 Sets if trigger should also search vehicle inventory when looking for prefabs/classnames inside. More...
 
void SetOnce (bool bOnce)
 Sets if trigger can be finished just once. More...
 
void SetNotificationEnabled (bool notificationEnabled)
 Sets if HUD notifications are enabled. More...
 
void SetTriggerConditionsStatus (bool status)
 Sets trigger conditions status. More...
 
void SetEnableAudio (bool enableAudio)
 Sets if audio features from this trigger are enabled. More...
 
void SetMinimumPlayersNeeded (float minimumPlayersNeededPercentage)
 Sets minimum player percentage needed to finish this trigger. More...
 
void SetPlayerActivationNotificationTitle (string sTitle)
 Sets HUD activation notification title. More...
 
void SetActivationCountdownTimer (float activationCountdownTimer)
 Sets activation coundown timer. More...
 
void SetCountdownAudio (string sAudioName)
 Sets which audio can be played from activating this trigger. More...
 
void SetCustomTriggerConditions (array< ref SCR_CustomTriggerConditions > triggerConditions)
 Sets custom trigger conditions. More...
 
void SetOwnerFaction (FactionKey sFaction)
 Sets faction that "owns" this trigger. More...
 
bool IsMaster ()
 Returns if this is executed in a server environment. More...
 
Faction GetOwnerFaction ()
 Returns trigger faction owner. More...
 
ResourceName GetCountdownHUD ()
 Returns the countdown HUD resource name. More...
 
float GetActivationCountdownTimer ()
 Returns activation countdown timer. More...
 
float GetActivationCountdownTimerTemp ()
 Returns activation countdown timer temporary value which is calculated by the trigger but changes over time. More...
 
float GetMinimumPlayersNeededPercentage ()
 Returns minimum players needed percentage. More...
 
string GetPlayerActivationNotificationTitle ()
 Returns player activation notification title. More...
 
bool GetNotificationEnabled ()
 Returns if HUD notifications are enabled. More...
 
bool GetTriggerConditionsStatus ()
 Returns trigger conditions status. More...
 
int GetCountInsideTrigger ()
 Returns number of all the entities that are inside this trigger. More...
 
int GetCountEntitiesInside ()
 Returns all entities that are inside this trigger. More...
 
int GetPlayersCountByFaction ()
 Returns number of players in game by the faction set for this trigger. More...
 
int GetSpecificClassCountInsideTrigger (string className, int targetCount=-1)
 Returns number of specific class that is inside of this trigger. More...
 
int GetSpecificPrefabCountInsideTrigger (BaseContainer prefabContainer, int targetCount=-1, bool includeInheritance=false)
 Returns number of specific prefab that is inside of this trigger. More...
 
int GetCharacterCountByFactionInsideTrigger (Faction faction, int targetCount=-1)
 Returns number of characters from the selected faction that are inside this trigger. More...
 
int GetPlayersCountByFactionInsideTrigger (Faction faction)
 Returns number of players from the selected faction that are inside this trigger. More...
 
void GetPlayersByFactionInsideTrigger (notnull out array< IEntity > aOut)
 Returns all the players by the faction set for this trigger. More...
 
void GetPlayersByFaction (notnull out array< IEntity > aOut)
 Returns all the players in the game. More...
 
override bool ScriptedEntityFilterForQuery (IEntity ent)
 Override this method in inherited class to define a new filter. More...
 
void FinishTrigger (IEntity ent)
 Finishes trigger. More...
 
void ActivationPresenceConditions ()
 Checks activation presesence conditions. More...
 
protected void CustomTriggerConditions ()
 This method handles custom conditions. More...
 
protected void HandleNetworkComponentForPlayersInside (IEntity ent)
 Handles players inside the trigger or those who left it. More...
 
protected void ProcessPlayerNetworkComponent (IEntity entity, bool leftTrigger=false)
 Processes the entity and its Network component to replicate only for each player inside the trigger. More...
 
protected void HandleTimer ()
 Handles if timer should be ticking or not. More...
 
protected void UpdateTimer ()
 Updates the timer value and passes info to HUD. More...
 
override protected event void OnActivate (IEntity ent)
 callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger More...
 
override event protected void OnQueryFinished (bool bIsEmpty)
 
override protected event void OnDeactivate (IEntity ent)
 callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger More...
 
void OnDeactivateCalledLater (IEntity ent)
 
void HandleAudio ()
 
void PlayMusic (string sAudio)
 
protected void RpcDo_PlayMusic (string sAudio)
 
void StopMusic (string sAudio)
 
protected void RpcDo_StopMusic (string sAudio)
 
void OnChange (IEntity ent)
 
ScriptInvoker GetOnChange ()
 
protected void SetInitSequenceDone ()
 Sets Init sequence as done. More...
 
override protected void EOnInit (IEntity owner)
 Initializes the trigger. More...
 

Variables

SCR_CharacterTriggerEntityClass PLAYER = 0
 
SCR_CharacterTriggerEntityClass ANY_CHARACTER = 0
 
SCR_CharacterTriggerEntityClass SPECIFIC_CLASS = 0
 
SCR_CharacterTriggerEntityClass SPECIFIC_PREFAB_NAME = 0
 
protected FactionKey m_sOwnerFactionKey
 
protected TA_EActivationPresence m_eActivationPresence
 
protected ref array< string > m_aSpecificEntityNames
 
protected ref array< string > m_aSpecificClassNames
 
protected ref array< ref SCR_ScenarioFrameworkPrefabFilterm_aPrefabFilter
 
protected ref array< ref SCR_CustomTriggerConditions > m_aCustomTriggerConditions
 
protected bool m_bSearchVehicleInventory
 
protected bool m_bOnce
 
protected float m_fMinimumPlayersNeededPercentage
 
protected float m_fActivationCountdownTimer
 
protected bool m_bNotificationEnabled
 
protected ResourceName m_sCountdownHUD
 
protected string m_sPlayerActivationNotificationTitle
 
protected bool m_bEnableAudio
 
protected string m_sCountdownAudio
 
protected ref set< BaseContainer > m_aPrefabContainerSet = new set<BaseContainer>()
 
protected ref ScriptInvoker m_OnChange
 
protected Faction m_OwnerFaction
 
protected float m_fTempWaitTime = m_fActivationCountdownTimer
 
protected bool m_bInitSequenceDone = false
 
protected bool m_bCountdownMusicPlaying
 
protected ref array< IEntity > m_aEntitiesInside = {}
 
protected ref array< IEntity > m_aPlayersInside = {}
 
protected MusicManager m_MusicManager
 
protected bool m_bTriggerConditionsStatus
 
protected bool m_bTimerActive
 
protected int m_iCountInsideTrigger
 

Typedef Documentation

◆ ScriptInvokerTriggerUpdated

Definition at line 15 of file SCR_CharacterTriggerEntity.c.

Function Documentation

◆ ActivationPresenceConditions()

void BaseContainerProps::ActivationPresenceConditions ( )

Checks activation presesence conditions.

Definition at line 583 of file SCR_CharacterTriggerEntity.c.

◆ BaseContainerProps()

SCR_CharacterTriggerEntity SCR_BaseTriggerEntity BaseContainerProps ( )

This method is supposed to be overridden in a new class that extends this class and it is used if some init actions are needed

This method is supposed to be overridden in a new class that extends this class and it is used in evaluation afterwards

Definition at line 891 of file SCR_CharacterTriggerEntity.c.

◆ CustomTriggerConditions()

protected void BaseContainerProps::CustomTriggerConditions ( )

This method handles custom conditions.

Definition at line 601 of file SCR_CharacterTriggerEntity.c.

◆ FinishTrigger()

void BaseContainerProps::FinishTrigger ( IEntity  ent)

Finishes trigger.

Definition at line 569 of file SCR_CharacterTriggerEntity.c.

◆ GetActivationCountdownTimer()

float BaseContainerProps::GetActivationCountdownTimer ( )

Returns activation countdown timer.

Definition at line 210 of file SCR_CharacterTriggerEntity.c.

◆ GetActivationCountdownTimerTemp()

float BaseContainerProps::GetActivationCountdownTimerTemp ( )

Returns activation countdown timer temporary value which is calculated by the trigger but changes over time.

Definition at line 217 of file SCR_CharacterTriggerEntity.c.

◆ GetCharacterCountByFactionInsideTrigger()

int BaseContainerProps::GetCharacterCountByFactionInsideTrigger ( Faction  faction,
int  targetCount = -1 
)

Returns number of characters from the selected faction that are inside this trigger.

Definition at line 417 of file SCR_CharacterTriggerEntity.c.

◆ GetCountdownHUD()

ResourceName BaseContainerProps::GetCountdownHUD ( )

Returns the countdown HUD resource name.

Definition at line 203 of file SCR_CharacterTriggerEntity.c.

◆ GetCountEntitiesInside()

int BaseContainerProps::GetCountEntitiesInside ( )

Returns all entities that are inside this trigger.

Definition at line 259 of file SCR_CharacterTriggerEntity.c.

◆ GetCountInsideTrigger()

int BaseContainerProps::GetCountInsideTrigger ( )

Returns number of all the entities that are inside this trigger.

Definition at line 252 of file SCR_CharacterTriggerEntity.c.

◆ GetMinimumPlayersNeededPercentage()

float BaseContainerProps::GetMinimumPlayersNeededPercentage ( )

Returns minimum players needed percentage.

Definition at line 224 of file SCR_CharacterTriggerEntity.c.

◆ GetNotificationEnabled()

bool BaseContainerProps::GetNotificationEnabled ( )

Returns if HUD notifications are enabled.

Definition at line 238 of file SCR_CharacterTriggerEntity.c.

◆ GetOnChange()

ScriptInvoker BaseContainerProps::GetOnChange ( )

Definition at line 838 of file SCR_CharacterTriggerEntity.c.

◆ GetOwnerFaction()

Faction BaseContainerProps::GetOwnerFaction ( )

Returns trigger faction owner.

Definition at line 196 of file SCR_CharacterTriggerEntity.c.

◆ GetPlayerActivationNotificationTitle()

string BaseContainerProps::GetPlayerActivationNotificationTitle ( )

Returns player activation notification title.

Definition at line 231 of file SCR_CharacterTriggerEntity.c.

◆ GetPlayersByFaction()

void BaseContainerProps::GetPlayersByFaction ( notnull out array< IEntity >  aOut)

Returns all the players in the game.

Definition at line 506 of file SCR_CharacterTriggerEntity.c.

◆ GetPlayersByFactionInsideTrigger()

void BaseContainerProps::GetPlayersByFactionInsideTrigger ( notnull out array< IEntity >  aOut)

Returns all the players by the faction set for this trigger.

Definition at line 474 of file SCR_CharacterTriggerEntity.c.

◆ GetPlayersCountByFaction()

int BaseContainerProps::GetPlayersCountByFaction ( )

Returns number of players in game by the faction set for this trigger.

Definition at line 267 of file SCR_CharacterTriggerEntity.c.

◆ GetPlayersCountByFactionInsideTrigger()

int BaseContainerProps::GetPlayersCountByFactionInsideTrigger ( Faction  faction)

Returns number of players from the selected faction that are inside this trigger.

Definition at line 444 of file SCR_CharacterTriggerEntity.c.

◆ GetSpecificClassCountInsideTrigger()

int BaseContainerProps::GetSpecificClassCountInsideTrigger ( string  className,
int  targetCount = -1 
)

Returns number of specific class that is inside of this trigger.

Definition at line 295 of file SCR_CharacterTriggerEntity.c.

◆ GetSpecificPrefabCountInsideTrigger()

int BaseContainerProps::GetSpecificPrefabCountInsideTrigger ( BaseContainer  prefabContainer,
int  targetCount = -1,
bool  includeInheritance = false 
)

Returns number of specific prefab that is inside of this trigger.

Definition at line 344 of file SCR_CharacterTriggerEntity.c.

◆ GetTriggerConditionsStatus()

bool BaseContainerProps::GetTriggerConditionsStatus ( )

Returns trigger conditions status.

Definition at line 245 of file SCR_CharacterTriggerEntity.c.

◆ HandleAudio()

void BaseContainerProps::HandleAudio ( )

Definition at line 739 of file SCR_CharacterTriggerEntity.c.

◆ HandleNetworkComponentForPlayersInside()

protected void BaseContainerProps::HandleNetworkComponentForPlayersInside ( IEntity  ent)

Handles players inside the trigger or those who left it.

Definition at line 611 of file SCR_CharacterTriggerEntity.c.

◆ HandleTimer()

protected void BaseContainerProps::HandleTimer ( )

Handles if timer should be ticking or not.

Definition at line 645 of file SCR_CharacterTriggerEntity.c.

◆ IsMaster()

bool BaseContainerProps::IsMaster ( )

Returns if this is executed in a server environment.

Definition at line 188 of file SCR_CharacterTriggerEntity.c.

◆ OnChange()

void BaseContainerProps::OnChange ( IEntity  ent)

Definition at line 828 of file SCR_CharacterTriggerEntity.c.

◆ OnDeactivateCalledLater()

void BaseContainerProps::OnDeactivateCalledLater ( IEntity  ent)

Definition at line 717 of file SCR_CharacterTriggerEntity.c.

◆ OnQueryFinished()

override event protected void BaseContainerProps::OnQueryFinished ( bool  bIsEmpty)

Definition at line 684 of file SCR_CharacterTriggerEntity.c.

◆ PlayMusic()

void BaseContainerProps::PlayMusic ( string  sAudio)

Definition at line 753 of file SCR_CharacterTriggerEntity.c.

◆ ProcessPlayerNetworkComponent()

protected void BaseContainerProps::ProcessPlayerNetworkComponent ( IEntity  entity,
bool  leftTrigger = false 
)

Processes the entity and its Network component to replicate only for each player inside the trigger.

Definition at line 628 of file SCR_CharacterTriggerEntity.c.

◆ RpcDo_PlayMusic()

protected void BaseContainerProps::RpcDo_PlayMusic ( string  sAudio)

Definition at line 774 of file SCR_CharacterTriggerEntity.c.

◆ RpcDo_StopMusic()

protected void BaseContainerProps::RpcDo_StopMusic ( string  sAudio)

Definition at line 811 of file SCR_CharacterTriggerEntity.c.

◆ ScriptedEntityFilterForQuery()

override bool BaseContainerProps::ScriptedEntityFilterForQuery ( IEntity  ent)

Override this method in inherited class to define a new filter.

Definition at line 524 of file SCR_CharacterTriggerEntity.c.

◆ ScriptInvokerTriggerUpdated()

SCR_CharacterTriggerEntityClass SCR_BaseTriggerEntityClass ScriptInvokerTriggerUpdated ( float  activationCountdownTimer,
float  tempWaitTime,
int  playersCountByFactionInside,
int  playersCountByFaction,
string  playerActivationNotificationTitle,
bool  triggerConditionsStatus,
float  minimumPlayersNeededPercentage 
)

◆ SetActivationCountdownTimer()

void BaseContainerProps::SetActivationCountdownTimer ( float  activationCountdownTimer)

Sets activation coundown timer.

Definition at line 158 of file SCR_CharacterTriggerEntity.c.

◆ SetActivationPresence()

void BaseContainerProps::SetActivationPresence ( TA_EActivationPresence  EActivationPresence)

Sets Activation Presence.

Definition at line 80 of file SCR_CharacterTriggerEntity.c.

◆ SetCountdownAudio()

void BaseContainerProps::SetCountdownAudio ( string  sAudioName)

Sets which audio can be played from activating this trigger.

Definition at line 165 of file SCR_CharacterTriggerEntity.c.

◆ SetCustomTriggerConditions()

void BaseContainerProps::SetCustomTriggerConditions ( array< ref SCR_CustomTriggerConditions >  triggerConditions)

Sets custom trigger conditions.

Definition at line 172 of file SCR_CharacterTriggerEntity.c.

◆ SetEnableAudio()

void BaseContainerProps::SetEnableAudio ( bool  enableAudio)

Sets if audio features from this trigger are enabled.

Definition at line 137 of file SCR_CharacterTriggerEntity.c.

◆ SetInitSequenceDone()

protected void BaseContainerProps::SetInitSequenceDone ( )

Sets Init sequence as done.

Definition at line 848 of file SCR_CharacterTriggerEntity.c.

◆ SetMinimumPlayersNeeded()

void BaseContainerProps::SetMinimumPlayersNeeded ( float  minimumPlayersNeededPercentage)

Sets minimum player percentage needed to finish this trigger.

Definition at line 144 of file SCR_CharacterTriggerEntity.c.

◆ SetNotificationEnabled()

void BaseContainerProps::SetNotificationEnabled ( bool  notificationEnabled)

Sets if HUD notifications are enabled.

Definition at line 123 of file SCR_CharacterTriggerEntity.c.

◆ SetOnce()

void BaseContainerProps::SetOnce ( bool  bOnce)

Sets if trigger can be finished just once.

Definition at line 116 of file SCR_CharacterTriggerEntity.c.

◆ SetOwnerFaction()

void BaseContainerProps::SetOwnerFaction ( FactionKey  sFaction)

Sets faction that "owns" this trigger.

Definition at line 179 of file SCR_CharacterTriggerEntity.c.

◆ SetPlayerActivationNotificationTitle()

void BaseContainerProps::SetPlayerActivationNotificationTitle ( string  sTitle)

Sets HUD activation notification title.

Definition at line 151 of file SCR_CharacterTriggerEntity.c.

◆ SetPrefabFilters()

void BaseContainerProps::SetPrefabFilters ( array< ref SCR_ScenarioFrameworkPrefabFilter aPrefabFilter)

Sets specific prefab filters to be searched in the trigger.

Definition at line 98 of file SCR_CharacterTriggerEntity.c.

◆ SetSearchVehicleInventory()

void BaseContainerProps::SetSearchVehicleInventory ( bool  search)

Sets if trigger should also search vehicle inventory when looking for prefabs/classnames inside.

Definition at line 109 of file SCR_CharacterTriggerEntity.c.

◆ SetSpecificClassName()

void BaseContainerProps::SetSpecificClassName ( array< string >  aClassName)

Sets specific classnames to be searched in the trigger.

Definition at line 87 of file SCR_CharacterTriggerEntity.c.

◆ SetTriggerConditionsStatus()

void BaseContainerProps::SetTriggerConditionsStatus ( bool  status)

Sets trigger conditions status.

Definition at line 130 of file SCR_CharacterTriggerEntity.c.

◆ StopMusic()

void BaseContainerProps::StopMusic ( string  sAudio)

Definition at line 791 of file SCR_CharacterTriggerEntity.c.

◆ UpdateTimer()

protected void BaseContainerProps::UpdateTimer ( )

Updates the timer value and passes info to HUD.

Definition at line 665 of file SCR_CharacterTriggerEntity.c.

Variable Documentation

◆ ANY_CHARACTER

◆ m_aCustomTriggerConditions

protected ref array<ref SCR_CustomTriggerConditions> m_aCustomTriggerConditions

Definition at line 32 of file SCR_CharacterTriggerEntity.c.

◆ m_aEntitiesInside

protected ref array<IEntity> m_aEntitiesInside = {}

Definition at line 68 of file SCR_CharacterTriggerEntity.c.

◆ m_aPlayersInside

protected ref array<IEntity> m_aPlayersInside = {}

Definition at line 69 of file SCR_CharacterTriggerEntity.c.

◆ m_aPrefabContainerSet

protected ref set<BaseContainer> m_aPrefabContainerSet = new set<BaseContainer>()

Definition at line 61 of file SCR_CharacterTriggerEntity.c.

◆ m_aPrefabFilter

protected ref array<ref SCR_ScenarioFrameworkPrefabFilter> m_aPrefabFilter

Definition at line 29 of file SCR_CharacterTriggerEntity.c.

◆ m_aSpecificClassNames

protected ref array<string> m_aSpecificClassNames

Definition at line 26 of file SCR_CharacterTriggerEntity.c.

◆ m_aSpecificEntityNames

protected ref array<string> m_aSpecificEntityNames

Definition at line 23 of file SCR_CharacterTriggerEntity.c.

◆ m_bCountdownMusicPlaying

protected bool m_bCountdownMusicPlaying

Definition at line 67 of file SCR_CharacterTriggerEntity.c.

◆ m_bEnableAudio

protected bool m_bEnableAudio

Definition at line 56 of file SCR_CharacterTriggerEntity.c.

◆ m_bInitSequenceDone

protected bool m_bInitSequenceDone = false

Definition at line 66 of file SCR_CharacterTriggerEntity.c.

◆ m_bNotificationEnabled

protected bool m_bNotificationEnabled

Definition at line 47 of file SCR_CharacterTriggerEntity.c.

◆ m_bOnce

protected bool m_bOnce

Definition at line 38 of file SCR_CharacterTriggerEntity.c.

◆ m_bSearchVehicleInventory

protected bool m_bSearchVehicleInventory

Definition at line 35 of file SCR_CharacterTriggerEntity.c.

◆ m_bTimerActive

protected bool m_bTimerActive

Definition at line 72 of file SCR_CharacterTriggerEntity.c.

◆ m_bTriggerConditionsStatus

protected bool m_bTriggerConditionsStatus

Definition at line 71 of file SCR_CharacterTriggerEntity.c.

◆ m_eActivationPresence

protected TA_EActivationPresence m_eActivationPresence

Definition at line 20 of file SCR_CharacterTriggerEntity.c.

◆ m_fActivationCountdownTimer

protected float m_fActivationCountdownTimer

Definition at line 44 of file SCR_CharacterTriggerEntity.c.

◆ m_fMinimumPlayersNeededPercentage

protected float m_fMinimumPlayersNeededPercentage

Definition at line 41 of file SCR_CharacterTriggerEntity.c.

◆ m_fTempWaitTime

protected float m_fTempWaitTime = m_fActivationCountdownTimer

Definition at line 65 of file SCR_CharacterTriggerEntity.c.

◆ m_iCountInsideTrigger

protected int m_iCountInsideTrigger

Definition at line 73 of file SCR_CharacterTriggerEntity.c.

◆ m_MusicManager

protected MusicManager m_MusicManager

Definition at line 70 of file SCR_CharacterTriggerEntity.c.

◆ m_OnChange

protected ref ScriptInvoker m_OnChange

Definition at line 63 of file SCR_CharacterTriggerEntity.c.

◆ m_OwnerFaction

protected Faction m_OwnerFaction

Definition at line 64 of file SCR_CharacterTriggerEntity.c.

◆ m_sCountdownAudio

protected string m_sCountdownAudio

Definition at line 59 of file SCR_CharacterTriggerEntity.c.

◆ m_sCountdownHUD

protected ResourceName m_sCountdownHUD

Definition at line 50 of file SCR_CharacterTriggerEntity.c.

◆ m_sOwnerFactionKey

protected FactionKey m_sOwnerFactionKey

Definition at line 17 of file SCR_CharacterTriggerEntity.c.

◆ m_sPlayerActivationNotificationTitle

protected string m_sPlayerActivationNotificationTitle

Definition at line 53 of file SCR_CharacterTriggerEntity.c.

◆ PLAYER

◆ SPECIFIC_CLASS

SCR_CharacterTriggerEntityClass SPECIFIC_CLASS = 0

◆ SPECIFIC_PREFAB_NAME

SCR_CharacterTriggerEntityClass SPECIFIC_PREFAB_NAME = 0