Arma Reforger Script API
Loading...
Searching...
No Matches
Protected Member Functions | Protected Attributes | List of all members
SCR_CaptureAndHoldSpawnArea Interface Reference

This area trigger detects enemies not belonging to assigned faction, and raises callbacks which allow penalizing abusive behaviour. More...

Inheritance diagram for SCR_CaptureAndHoldSpawnArea:
[legend]

Protected Member Functions

override void OnInit (IEntity owner)
 Initializes and registers this area into parent manager.
 
override void OnFrame (IEntity owner, float timeSlice)
 Iterate through occupant entities and filter those of opposite faction.
 
override void OnCharacterEnter (IEntity character, bool isFriendly)
 Called when a character enters this area.
 
void OnLocalPlayerEnter (IEntity character, bool isFriendly)
 Called when the local character enters this area.
 
override void OnCharacterExit (IEntity character, bool isFriendly)
 Called when a character leaves this area.
 
void OnLocalPlayerExit (IEntity character, bool isFriendly)
 Called when the local character leaves this area.
 
void ~SCR_CaptureAndHoldSpawnArea ()
 Unregister self from parent manager.
 
- Protected Member Functions inherited from SCR_SpawnArea
bool IsLocalEntity (notnull IEntity ent)
 
override void OnActivate (IEntity ent)
 callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger
 
void OnCharacterEnter (IEntity character, bool isFriendly)
 
override void OnDeactivate (IEntity ent)
 callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger
 
void OnCharacterExit (IEntity character, bool isFriendly)
 
override void OnInit (IEntity owner)
 Initializes this area by initializing and preallocating required resources.
 
override void OnFrame (IEntity owner, float timeSlice)
 
void OnAlert (array< IEntity > enemies)
 
void OnInit (IEntity owner)
 
void OnFrame (IEntity owner, float timeSlice)
 
- Protected Member Functions inherited from BaseGameTriggerEntity
void OnActivate (IEntity ent)
 callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger
 
void OnDeactivate (IEntity ent)
 callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger
 
void OnQueryFinished (bool bIsEmpty)
 callback - query finished - occurs when the current query finished being processd and has updated results
 

Protected Attributes

LocalizedString m_sLocalPlayerAlertTitle
 
LocalizedString m_sLocalPlayerAlertText
 
float m_fPenaltyTime
 
IEntity m_pLastLocalEntity
 Last entity stored as the "local offender" or null if none.
 
ref map< IEntity, float > m_mTimeStamps
 Authority map for time spent in the trigger for individual entities (offending ones)
 
RplComponent m_pRplComponent
 RplComponent attached to this are or null if none.
 
- Protected Attributes inherited from SCR_SpawnArea
FactionKey m_sFactionKey
 Key of faction this area belongs to.
 
ref set< SCR_ChimeraCharacterm_sOccupants = new set<SCR_ChimeraCharacter>()
 Map of all occupants of this area.
 
ref SpawnAreaEvent m_pOnCharacterEnter = new SpawnAreaEvent()
 Callback raised when a character enters this area.
 
ref array< IEntity > m_aEnemies = {}
 Buffer of all enemy entities for a single frame.
 
ref SpawnAreaEvent m_pOnCharacterExit = new SpawnAreaEvent()
 Callback raised when a character leaves this area.
 
ref SpawnAreaAlertEvent m_pOnAlert = new SpawnAreaAlertEvent()
 Callback raised when area is occupied by at least one enemy character.
 
- Protected Attributes inherited from BaseGameTriggerEntity
ref ScriptInvoker Event_OnQueryFinished = new ScriptInvoker()
 

Additional Inherited Members

- Public Member Functions inherited from SCR_SpawnArea
SpawnAreaEvent GetCharacterEnterInvoker ()
 Returns invoker that is invoked when a character enters this area.
 
SpawnAreaEvent GetCharacterExitInvoker ()
 Returns invoker that is invoked when a character leaves this area.
 
SpawnAreaAlertEvent GetOnAlertInvoker ()
 Returns invoker that is invoked when area is occupied by at least one enemy character.
 
Faction GetAffiliatedFaction ()
 Returns the faction this area is affiliated with or null if none.
 
FactionKey GetAffiliatedFactionKey ()
 Returns the faction key of faction this area is affiliated with or empty if none.
 
bool IsInside (SCR_ChimeraCharacter character)
 Check whether provided character is in this trigger.
 
bool IsFriendly (notnull SCR_ChimeraCharacter character)
 Check whether provided faction is friendly in relation to this area trigger.
 
int GetFriendlyCharactersInside (out notnull array< SCR_ChimeraCharacter > outCharacters)
 Fills the provided array with characters of friendly faction present in this area and returns the amount of them.
 
int GetEnemyCharactersInside (out notnull array< SCR_ChimeraCharacter > outCharacters)
 Fills the provided array with characters of enemy faction present in this area and returns the amount of them.
 
int GetCharactersInside (out notnull array< SCR_ChimeraCharacter > outCharacters)
 Fills the provided array with characters present in this area and returns the amount of them.
 
override bool ScriptedEntityFilterForQuery (IEntity ent)
 Override this method in inherited class to define a new filter.
 
bool ScriptedEntityFilterForQuery (IEntity ent)
 Override this method in inherited class to define a new filter. This base filter will not be used unless overridden!
 
- Public Member Functions inherited from BaseGameTriggerEntity
ScriptInvoker GetOnQueryFinished ()
 
proto external bool QueryEntityInside (notnull IEntity ent)
 
proto external void QueryEntitiesInside ()
 
proto external bool DefaultEntityFilterForQuery (IEntity ent)
 
proto external int GetEntitiesInside (out notnull array< IEntity > outEntities)
 Get the entities inside the triggers.
 
proto external void SetSphereRadius (float radius)
 
proto external float GetSphereRadius ()
 
proto external void SetUpdateRate (float updateRate)
 
proto external float GetUpdateRate ()
 
proto external void EnablePeriodicQueries (bool enable)
 
proto external bool IsPeriodicQueriesEnabled ()
 
proto external void AddFilterName (string name)
 Add a name to the filter.
 
proto external bool RemoveFilterName (string name)
 Remove a name from the filter.
 
proto external void AddClassType (TypeName classType)
 Add a class type to the filter.
 
proto external bool RemoveClassType (TypeName classType)
 Remove a class type from the filter.
 
proto external void AddPrefabFilter (PrefabFilter prefabFilter)
 Add a prefab filter to the filters.
 
proto external bool RemovePrefabFilter (PrefabFilter prefabFilter)
 Remove a prefab filter from the filters.
 
proto external EQueryEntitiesFlags GetTraceMask ()
 Get flag(s) from the traces done by the the trigger.
 
proto external void SetTraceMask (EQueryEntitiesFlags flags)
 Sets trace mask.
 
proto external void ClearTraceMask (EQueryEntitiesFlags flags)
 Clears trace mask.
 

Detailed Description

This area trigger detects enemies not belonging to assigned faction, and raises callbacks which allow penalizing abusive behaviour.

Constructor & Destructor Documentation

◆ ~SCR_CaptureAndHoldSpawnArea()

void SCR_CaptureAndHoldSpawnArea.~SCR_CaptureAndHoldSpawnArea ( )
protected

Unregister self from parent manager.

Member Function Documentation

◆ OnCharacterEnter()

override void SCR_CaptureAndHoldSpawnArea.OnCharacterEnter ( IEntity  character,
bool  isFriendly 
)
protected

Called when a character enters this area.

Implements SCR_SpawnArea.

◆ OnCharacterExit()

override void SCR_CaptureAndHoldSpawnArea.OnCharacterExit ( IEntity  character,
bool  isFriendly 
)
protected

Called when a character leaves this area.

Implements SCR_SpawnArea.

◆ OnFrame()

override void SCR_CaptureAndHoldSpawnArea.OnFrame ( IEntity  owner,
float  timeSlice 
)
protected

Iterate through occupant entities and filter those of opposite faction.

Punish enemy occupants by killing them in a preset duration.

Implements SCR_SpawnArea.

◆ OnInit()

override void SCR_CaptureAndHoldSpawnArea.OnInit ( IEntity  owner)
protected

Initializes and registers this area into parent manager.

Implements SCR_SpawnArea.

◆ OnLocalPlayerEnter()

void SCR_CaptureAndHoldSpawnArea.OnLocalPlayerEnter ( IEntity  character,
bool  isFriendly 
)
protected

Called when the local character enters this area.

◆ OnLocalPlayerExit()

void SCR_CaptureAndHoldSpawnArea.OnLocalPlayerExit ( IEntity  character,
bool  isFriendly 
)
protected

Called when the local character leaves this area.

Member Data Documentation

◆ m_fPenaltyTime

float SCR_CaptureAndHoldSpawnArea.m_fPenaltyTime
protected

◆ m_mTimeStamps

ref map<IEntity, float> SCR_CaptureAndHoldSpawnArea.m_mTimeStamps
protected

Authority map for time spent in the trigger for individual entities (offending ones)

◆ m_pLastLocalEntity

IEntity SCR_CaptureAndHoldSpawnArea.m_pLastLocalEntity
protected

Last entity stored as the "local offender" or null if none.

◆ m_pRplComponent

RplComponent SCR_CaptureAndHoldSpawnArea.m_pRplComponent
protected

RplComponent attached to this are or null if none.

◆ m_sLocalPlayerAlertText

LocalizedString SCR_CaptureAndHoldSpawnArea.m_sLocalPlayerAlertText
protected

◆ m_sLocalPlayerAlertTitle

LocalizedString SCR_CaptureAndHoldSpawnArea.m_sLocalPlayerAlertTitle
protected

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