Arma Reforger Script API
|
This area awards score to the faction which controls the area periodically. More...
Public Member Functions | |
Faction | GetContestingFaction () |
Returns the faction that currently owns the area or null if none. | |
bool | IsContested () |
Returns true if this area is being contested. | |
bool | IsMajor () |
Returns true if this area is marked as a major objective. | |
CaptureAreaTickEvent | GetOnTickInvoker () |
Returns invoker that is invoked when this area ticks (awards score). | |
int | GetScorePerTick () |
Returns score awarded per area tick. | |
LocalizedString | GetAreaSymbol () |
Returns the short "symbolic" one-character name of this area. | |
vector | GetLocalObjectiveCenter () |
Returns objective center in local space relative to the area. | |
vector | GetWorldObjectiveCenter () |
Returns objective center in world space. | |
bool | IsCharacterInside (SCR_ChimeraCharacter character) |
Returns true if provided character is in this area. | |
Public Member Functions inherited from SCR_CaptureArea | |
CaptureAreaEvent | GetCharacterEnterInvoker () |
Returns invoker that is invoked when a character enters this area. | |
CaptureAreaEvent | GetCharacterExitInvoker () |
Returns invoker that is invoked when a character exits this area. | |
CaptureAreaOwnershipEvent | GetOwnershipChangedEvent () |
Returns invoker that is invoked when a faction claims ownership of this area. | |
Faction | GetOwningFaction () |
Returns the faction that currently owns the area or null if none. | |
int | GetOccupants (Faction faction, notnull array< SCR_ChimeraCharacter > outCharacters) |
Fills the provided [outCharacters] array with all occupants of provided [faction]. | |
int | GetOccupantsCount (Faction faction) |
Returns the number of occupants of provided [faction]. | |
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. | |
Public Attributes | |
LocalizedString | m_sAreaSymbol |
vector | m_vObjectiveCenter |
float | m_fTickRate |
int | m_iScorePerTick |
int | m_iScorePerTickContested |
float | m_fContestingRatio |
bool | m_bIsMajor |
float | m_fTickTime |
Elapsed time. | |
Protected Member Functions | |
override bool | RplLoad (ScriptBitReader reader) |
Called when Item is initialized from replication stream. Carries the data from Master. | |
override bool | RplSave (ScriptBitWriter writer) |
Called when Item is getting replicated from Master to Slave connection. | |
void | SetContestingFactionInternal (Faction previousFaction, Faction newFaction) |
Sets internal owner faction and raises corresponding callback. | |
void | Rpc_SetContestingFaction_BC (int previousFactionIndex, int newFactionIndex) |
Notifies all clients of the owning faction change. | |
SCR_BaseGameMode | GetGameMode () |
Utility method - returns current scripted game mode. | |
SCR_BaseScoringSystemComponent | GetScoringSystemComponent () |
Returns scoring system attached to current gamemode (if any) or null otherwise. | |
override void | OnInit (IEntity owner) |
Initialize this area and register it to parent manager. | |
void | InitializeMapDescriptor (SCR_MapDescriptorComponent target) |
Initializes objective map descriptor for this area. | |
void | UpdateMapDescriptor (SCR_MapDescriptorComponent target) |
Updates objective map descriptor for this area with current state. | |
override void | OnFrame (IEntity owner, float timeSlice) |
Updates the area and awards points if held. | |
void | OnTick () |
Called when point ticks, ie. | |
void | DoSetContestingFaction (Faction previousFaction, Faction newFaction) |
Sets the Faction (or none) that currently contests this area. | |
override Faction | EvaluateOwnerFaction () |
Handles owning and contesting changes based on defined parameters. | |
void | OnContestingFactionChanged (Faction previousFaction, Faction newFaction) |
Occurs on change of contesting faction of the area. | |
override void | OnOwningFactionChanged (Faction previousFaction, Faction newFaction) |
Occurs on change of owning faction of the area. | |
void | ~SCR_CaptureAndHoldArea () |
Unregisters self from parent manager. | |
Protected Member Functions inherited from SCR_CaptureArea | |
override void | OnInit (IEntity owner) |
Initializes this area by initializing and preallocating required resources. | |
override bool | RplLoad (ScriptBitReader reader) |
Called when Item is initialized from replication stream. | |
override bool | RplSave (ScriptBitWriter writer) |
Called when Item is getting replicated from Master to Slave connection. | |
override bool | ScriptedEntityFilterForQuery (IEntity ent) |
By default queries only for characters of SCR_ChimeraCharacter type. | |
override void | OnActivate (IEntity ent) |
callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger | |
void | OnCharacterEntered (Faction faction, SCR_ChimeraCharacter character) |
Occurs when a [character] of provided [faction] enters the area. | |
override void | OnDeactivate (IEntity ent) |
callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger | |
void | OnCharacterExit (Faction faction, SCR_ChimeraCharacter character) |
Occurs when a [character] of provided [faction] leaves the area. | |
Faction | EvaluateOwnerFaction () |
Evaluate and return the faction that owns this point. | |
override void | OnFrame (IEntity owner, float timeSlice) |
Updates the internal state of the area and reevaluates the owner. | |
void | SetOwningFactionInternal (Faction previousFaction, Faction newFaction) |
Sets internal owner faction and raises corresponding callback. | |
void | Rpc_SetOwningFaction_BC (int previousFactionIndex, int newFactionIndex) |
Notifies all clients of the owning faction change. | |
void | OnOwningFactionChanged (Faction previousFaction, Faction newFaction) |
Occurs on change of faction ownership of the area. | |
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 | |
ref CaptureAreaTickEvent | m_OnTickEvent = new CaptureAreaTickEvent() |
Callback for when a tick event is raised by this area. | |
SCR_MapDescriptorComponent | m_MapDescriptor |
Attached map descriptor component used for visualization (if any) or null if none. | |
Faction | m_ContestingFaction |
The faction that currently attacking/contesting this point in relation to the owner faction. | |
Protected Attributes inherited from SCR_CaptureArea | |
ref map< Faction, ref array< SCR_ChimeraCharacter > > | m_mOccupants = new map<Faction, ref array<SCR_ChimeraCharacter>>() |
Map of all occupants of this area. | |
ref CaptureAreaEvent | m_pOnCharacterEnter = new CaptureAreaEvent() |
Callback raised when a character enters this area. | |
ref CaptureAreaEvent | m_pOnCharacterExit = new CaptureAreaEvent() |
Callback raised when a character leaves this area. | |
ref CaptureAreaOwnershipEvent | m_pOnOwnershipChanged = new CaptureAreaOwnershipEvent() |
Callback raised when a new faction claims ownership of this area. | |
Faction | m_pOwnerFaction |
The faction that currently owns this area. | |
RplComponent | m_pRplComponent |
Replication component of this entity. | |
Protected Attributes inherited from BaseGameTriggerEntity | |
ref ScriptInvoker | Event_OnQueryFinished = new ScriptInvoker() |
This area awards score to the faction which controls the area periodically.
Area registers and unregisters from the SCR_CaptureAndHoldManager.
|
protected |
Unregisters self from parent manager.
|
protected |
Sets the Faction (or none) that currently contests this area.
Authority only setter, replicated to clients.
|
protected |
Handles owning and contesting changes based on defined parameters.
Implements SCR_CaptureArea.
LocalizedString SCR_CaptureAndHoldArea.GetAreaSymbol | ( | ) |
Returns the short "symbolic" one-character name of this area.
Faction SCR_CaptureAndHoldArea.GetContestingFaction | ( | ) |
Returns the faction that currently owns the area or null if none.
|
protected |
Utility method - returns current scripted game mode.
vector SCR_CaptureAndHoldArea.GetLocalObjectiveCenter | ( | ) |
Returns objective center in local space relative to the area.
CaptureAreaTickEvent SCR_CaptureAndHoldArea.GetOnTickInvoker | ( | ) |
Returns invoker that is invoked when this area ticks (awards score).
int SCR_CaptureAndHoldArea.GetScorePerTick | ( | ) |
Returns score awarded per area tick.
|
protected |
Returns scoring system attached to current gamemode (if any) or null otherwise.
vector SCR_CaptureAndHoldArea.GetWorldObjectiveCenter | ( | ) |
Returns objective center in world space.
|
protected |
Initializes objective map descriptor for this area.
target | Target map descriptor to initialize as this area |
bool SCR_CaptureAndHoldArea.IsCharacterInside | ( | SCR_ChimeraCharacter | character | ) |
Returns true if provided character is in this area.
A character must have an affiliated faction using the FactionAffiliationComponent.
bool SCR_CaptureAndHoldArea.IsContested | ( | ) |
Returns true if this area is being contested.
bool SCR_CaptureAndHoldArea.IsMajor | ( | ) |
Returns true if this area is marked as a major objective.
|
protected |
Updates the area and awards points if held.
Implements SCR_CaptureArea.
|
protected |
Initialize this area and register it to parent manager.
Implements SCR_CaptureArea.
|
protected |
Occurs on change of owning faction of the area.
previousFaction | Faction which held the point prior to this change or null if none. |
newFaction | Faction that holds the point after this change or null if none. |
Implements SCR_CaptureArea.
|
protected |
Called when point ticks, ie.
when score should be awarded Authority only.
|
protected |
Notifies all clients of the owning faction change.
Index of faction is -1 if null.
|
protected |
Called when Item is initialized from replication stream. Carries the data from Master.
Implements SCR_CaptureArea.
|
protected |
Called when Item is getting replicated from Master to Slave connection.
The data will be delivered to Slave using RplInit method.
Implements SCR_CaptureArea.
|
protected |
Sets internal owner faction and raises corresponding callback.
|
protected |
Updates objective map descriptor for this area with current state.
target | Target map descriptor to initialize as this area |
bool SCR_CaptureAndHoldArea.m_bIsMajor |
|
protected |
The faction that currently attacking/contesting this point in relation to the owner faction.
float SCR_CaptureAndHoldArea.m_fContestingRatio |
float SCR_CaptureAndHoldArea.m_fTickRate |
float SCR_CaptureAndHoldArea.m_fTickTime |
Elapsed time.
int SCR_CaptureAndHoldArea.m_iScorePerTick |
int SCR_CaptureAndHoldArea.m_iScorePerTickContested |
|
protected |
Attached map descriptor component used for visualization (if any) or null if none.
|
protected |
Callback for when a tick event is raised by this area.
LocalizedString SCR_CaptureAndHoldArea.m_sAreaSymbol |
vector SCR_CaptureAndHoldArea.m_vObjectiveCenter |