1[
EntityEditorProps(
category:
"GameScripted/GameMode", description:
"Area that provides events and API when an enemy enters it.")]
9typedef ScriptInvokerBase<SpawnAreaCharacterEventDelegate>
SpawnAreaEvent;
26 [
Attribute(
"",
UIWidgets.EditBox,
"The key specifying which faction this area belongs to.")]
34 protected ref set<SCR_ChimeraCharacter>>
m_sOccupants =
new set<SCR_ChimeraCharacter>();
103 Faction faction = character.GetFaction();
113 if (areaFaction && areaFaction.IsFactionFriendly(faction))
129 outCharacters.Clear();
138 outCharacters.Insert(character);
155 outCharacters.Clear();
164 outCharacters.Insert(character);
181 outCharacters.Clear();
185 outCharacters.Insert(character);
196 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(ent);
200 return !character.GetCharacterController().IsDead();
206 PlayerController playerController =
GetGame().GetPlayerController();
207 if (playerController && playerController.GetControlledEntity() == ent)
217 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(ent);
241 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(ent);
271 super.OnFrame(owner, timeSlice);
277 if (character.GetCharacterController().IsDead())
290 protected event void OnAlert(array<IEntity> enemies)
ArmaReforgerScripted GetGame()
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
func SpawnAreaAlertEventDelegate
ScriptInvokerBase< SpawnAreaCharacterEventDelegate > SpawnAreaEvent
ScriptInvokerBase< SpawnAreaAlertEventDelegate > SpawnAreaAlertEvent
func SpawnAreaCharacterEventDelegate
override void OnFrame(IEntity owner, float timeSlice)
bool IsFriendly(notnull SCR_ChimeraCharacter character)
ref set< SCR_ChimeraCharacter > m_sOccupants
override bool ScriptedEntityFilterForQuery(IEntity ent)
Override this method in inherited class to define a new filter.
SpawnAreaAlertEvent GetOnAlertInvoker()
Returns invoker that is invoked when area is occupied by at least one enemy character.
FactionKey GetAffiliatedFactionKey()
Returns the faction key of faction this area is affiliated with or empty if none.
int GetEnemyCharactersInside(out notnull array< SCR_ChimeraCharacter > outCharacters)
int GetFriendlyCharactersInside(out notnull array< SCR_ChimeraCharacter > outCharacters)
ref SpawnAreaEvent m_pOnCharacterExit
Callback raised when a character leaves this area.
override void OnInit(IEntity owner)
Initializes this area by initializing and preallocating required resources.
SpawnAreaEvent GetCharacterEnterInvoker()
Returns invoker that is invoked when a character enters this area.
ref array< IEntity > m_aEnemies
Buffer of all enemy entities for a single frame.
int GetCharactersInside(out notnull array< SCR_ChimeraCharacter > outCharacters)
ref SpawnAreaAlertEvent m_pOnAlert
Callback raised when area is occupied by at least one enemy character.
ref SpawnAreaEvent m_pOnCharacterEnter
Callback raised when a character enters this area.
event void OnCharacterExit(IEntity character, bool isFriendly)
override void OnDeactivate(IEntity ent)
callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger
override void OnActivate(IEntity ent)
callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigg...
Faction GetAffiliatedFaction()
Returns the faction this area is affiliated with or null if none.
bool IsInside(SCR_ChimeraCharacter character)
bool IsLocalEntity(notnull IEntity ent)
event void OnAlert(array< IEntity > enemies)
event void OnCharacterEnter(IEntity character, bool isFriendly)
SpawnAreaEvent GetCharacterExitInvoker()
Returns invoker that is invoked when a character leaves this area.
FactionKey m_sFactionKey
Key of faction this area belongs to.
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.