Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SpawnArea Class Reference
Inheritance diagram for SCR_SpawnArea:

Protected Member Functions

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)
bool IsFriendly (notnull SCR_ChimeraCharacter character)
int GetFriendlyCharactersInside (out notnull array< SCR_ChimeraCharacter > outCharacters)
int GetEnemyCharactersInside (out notnull array< SCR_ChimeraCharacter > outCharacters)
int GetCharactersInside (out notnull array< SCR_ChimeraCharacter > outCharacters)
override bool ScriptedEntityFilterForQuery (IEntity ent)
 Override this method in inherited class to define a new filter.
bool IsLocalEntity (notnull IEntity ent)
override void OnActivate (IEntity ent)
 callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger
event void OnCharacterEnter (IEntity character, bool isFriendly)
override void OnDeactivate (IEntity ent)
 callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger
event 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)
event void OnAlert (array< IEntity > enemies)

Protected Attributes

FactionKey m_sFactionKey
 Key of faction this area belongs to.
ref set< SCR_ChimeraCharacter > m_sOccupants = new set<SCR_ChimeraCharacter>()
ref SpawnAreaEvent m_pOnCharacterEnter = new SpawnAreaEvent()
 Callback raised when a character enters this area.
ref array< IEntitym_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.

Detailed Description

Spawn area is a trigger entity that provides callback and API in regards to enemy characters entering and/or leaving the area. Characters must be assigned to a faction to be recognized by this area. In addition, the area itself must have periodic update enabled, otherwise callbacks might not be raised.

Definition at line 23 of file SCR_SpawnArea.c.

Member Function Documentation

◆ GetAffiliatedFaction()

Faction SCR_SpawnArea::GetAffiliatedFaction ( )
inlineprotected

Returns the faction this area is affiliated with or null if none.

Definition at line 71 of file SCR_SpawnArea.c.

◆ GetAffiliatedFactionKey()

FactionKey SCR_SpawnArea::GetAffiliatedFactionKey ( )
inlineprotected

Returns the faction key of faction this area is affiliated with or empty if none.

Definition at line 78 of file SCR_SpawnArea.c.

◆ GetCharacterEnterInvoker()

SpawnAreaEvent SCR_SpawnArea::GetCharacterEnterInvoker ( )
inlineprotected

Returns invoker that is invoked when a character enters this area.

Definition at line 44 of file SCR_SpawnArea.c.

◆ GetCharacterExitInvoker()

SpawnAreaEvent SCR_SpawnArea::GetCharacterExitInvoker ( )
inlineprotected

Returns invoker that is invoked when a character leaves this area.

Definition at line 54 of file SCR_SpawnArea.c.

◆ GetCharactersInside()

int SCR_SpawnArea::GetCharactersInside ( out notnull array< SCR_ChimeraCharacter > outCharacters)
inlineprotected

Fills the provided array with characters present in this area and returns the amount of them.

Parameters
outCharactersThe array to clear and will with data.
Returns
Returns number of characters provided.

Definition at line 179 of file SCR_SpawnArea.c.

◆ GetEnemyCharactersInside()

int SCR_SpawnArea::GetEnemyCharactersInside ( out notnull array< SCR_ChimeraCharacter > outCharacters)
inlineprotected

Fills the provided array with characters of enemy faction present in this area and returns the amount of them.

Parameters
outCharactersThe array to clear and will with data.
Returns
Returns number of characters provided.

Definition at line 153 of file SCR_SpawnArea.c.

◆ GetFriendlyCharactersInside()

int SCR_SpawnArea::GetFriendlyCharactersInside ( out notnull array< SCR_ChimeraCharacter > outCharacters)
inlineprotected

Fills the provided array with characters of friendly faction present in this area and returns the amount of them.

Parameters
outCharactersThe array to clear and will with data.
Returns
Returns number of characters provided.

Definition at line 127 of file SCR_SpawnArea.c.

◆ GetOnAlertInvoker()

SpawnAreaAlertEvent SCR_SpawnArea::GetOnAlertInvoker ( )
inlineprotected

Returns invoker that is invoked when area is occupied by at least one enemy character.

Definition at line 64 of file SCR_SpawnArea.c.

◆ IsFriendly()

bool SCR_SpawnArea::IsFriendly ( notnull SCR_ChimeraCharacter character)
inlineprotected

Check whether provided faction is friendly in relation to this area trigger.

Returns
Returns true in case faction is friendly, false otherwise.

Definition at line 101 of file SCR_SpawnArea.c.

◆ IsInside()

bool SCR_SpawnArea::IsInside ( SCR_ChimeraCharacter character)
inlineprotected

Check whether provided character is in this trigger.

Returns
Returns true if character is inside of this trigger, false otherwise.

Definition at line 88 of file SCR_SpawnArea.c.

◆ IsLocalEntity()

bool SCR_SpawnArea::IsLocalEntity ( notnull IEntity ent)
inlineprotected

Definition at line 204 of file SCR_SpawnArea.c.

◆ OnActivate()

override void SCR_SpawnArea::OnActivate ( IEntity ent)
inlineprotected

callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger

Definition at line 215 of file SCR_SpawnArea.c.

◆ OnAlert()

event void SCR_SpawnArea::OnAlert ( array< IEntity > enemies)
inlineprotected

Definition at line 290 of file SCR_SpawnArea.c.

◆ OnCharacterEnter()

event void SCR_SpawnArea::OnCharacterEnter ( IEntity character,
bool isFriendly )
inlineprotected

Definition at line 232 of file SCR_SpawnArea.c.

◆ OnCharacterExit()

event void SCR_SpawnArea::OnCharacterExit ( IEntity character,
bool isFriendly )
inlineprotected

Definition at line 255 of file SCR_SpawnArea.c.

◆ OnDeactivate()

override void SCR_SpawnArea::OnDeactivate ( IEntity ent)
inlineprotected

callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger

Definition at line 239 of file SCR_SpawnArea.c.

◆ OnFrame()

override void SCR_SpawnArea::OnFrame ( IEntity owner,
float timeSlice )
inlineprotected

Definition at line 269 of file SCR_SpawnArea.c.

◆ OnInit()

override void SCR_SpawnArea::OnInit ( IEntity owner)
inlineprotected

Initializes this area by initializing and preallocating required resources.

Definition at line 262 of file SCR_SpawnArea.c.

◆ ScriptedEntityFilterForQuery()

override bool SCR_SpawnArea::ScriptedEntityFilterForQuery ( IEntity ent)
inlineprotected

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

Definition at line 194 of file SCR_SpawnArea.c.

Member Data Documentation

◆ m_aEnemies

ref array<IEntity> SCR_SpawnArea::m_aEnemies = {}
protected

Buffer of all enemy entities for a single frame.

Definition at line 40 of file SCR_SpawnArea.c.

◆ m_pOnAlert

ref SpawnAreaAlertEvent SCR_SpawnArea::m_pOnAlert = new SpawnAreaAlertEvent()
protected

Callback raised when area is occupied by at least one enemy character.

Definition at line 60 of file SCR_SpawnArea.c.

◆ m_pOnCharacterEnter

ref SpawnAreaEvent SCR_SpawnArea::m_pOnCharacterEnter = new SpawnAreaEvent()
protected

Callback raised when a character enters this area.

Definition at line 37 of file SCR_SpawnArea.c.

◆ m_pOnCharacterExit

ref SpawnAreaEvent SCR_SpawnArea::m_pOnCharacterExit = new SpawnAreaEvent()
protected

Callback raised when a character leaves this area.

Definition at line 50 of file SCR_SpawnArea.c.

◆ m_sFactionKey

FactionKey SCR_SpawnArea::m_sFactionKey
protected

Key of faction this area belongs to.

Definition at line 27 of file SCR_SpawnArea.c.

◆ m_sOccupants

ref set<SCR_ChimeraCharacter> SCR_SpawnArea::m_sOccupants = new set<SCR_ChimeraCharacter>()
protected

Map of all occupants of this area. key: Faction value: Array of characters (must be alive)

Definition at line 34 of file SCR_SpawnArea.c.


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