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

Protected 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.
override bool RplLoad (ScriptBitReader reader)
 Called when Item is initialized from replication stream. Carries the data from Master.
override bool RplSave (ScriptBitWriter writer)
void SetContestingFactionInternal (Faction previousFaction, Faction newFaction)
 Sets internal owner faction and raises corresponding callback.
void Rpc_SetContestingFaction_BC (int previousFactionIndex, int newFactionIndex)
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.
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)
void UpdateMapDescriptor (SCR_MapDescriptorComponent target)
override void OnFrame (IEntity owner, float timeSlice)
 Updates the area and awards points if held.
void OnTick ()
void DoSetContestingFaction (Faction previousFaction, Faction newFaction)
override Faction EvaluateOwnerFaction ()
 Handles owning and contesting changes based on defined parameters.
bool IsCharacterInside (SCR_ChimeraCharacter character)
event void OnContestingFactionChanged (Faction previousFaction, Faction newFaction)
override void OnOwningFactionChanged (Faction previousFaction, Faction newFaction)
void ~SCR_CaptureAndHoldArea ()
 Unregisters self from parent manager.

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.

Detailed Description

This area awards score to the faction which controls the area periodically. Area registers and unregisters from the SCR_CaptureAndHoldManager.

Definition at line 13 of file SCR_CaptureAndHoldArea.c.

Constructor & Destructor Documentation

◆ ~SCR_CaptureAndHoldArea()

void SCR_CaptureAndHoldArea::~SCR_CaptureAndHoldArea ( )
inlineprotected

Unregisters self from parent manager.

Definition at line 486 of file SCR_CaptureAndHoldArea.c.

Member Function Documentation

◆ DoSetContestingFaction()

void SCR_CaptureAndHoldArea::DoSetContestingFaction ( Faction previousFaction,
Faction newFaction )
inlineprotected

Sets the Faction (or none) that currently contests this area. Authority only setter, replicated to clients.

Definition at line 364 of file SCR_CaptureAndHoldArea.c.

◆ EvaluateOwnerFaction()

override Faction SCR_CaptureAndHoldArea::EvaluateOwnerFaction ( )
inlineprotected

Handles owning and contesting changes based on defined parameters.

Definition at line 380 of file SCR_CaptureAndHoldArea.c.

◆ GetAreaSymbol()

LocalizedString SCR_CaptureAndHoldArea::GetAreaSymbol ( )
inlineprotected

Returns the short "symbolic" one-character name of this area.

Definition at line 148 of file SCR_CaptureAndHoldArea.c.

◆ GetContestingFaction()

Faction SCR_CaptureAndHoldArea::GetContestingFaction ( )
inlineprotected

Returns the faction that currently owns the area or null if none.

Definition at line 50 of file SCR_CaptureAndHoldArea.c.

◆ GetGameMode()

SCR_BaseGameMode SCR_CaptureAndHoldArea::GetGameMode ( )
inlineprotected

Utility method - returns current scripted game mode.

Definition at line 169 of file SCR_CaptureAndHoldArea.c.

◆ GetLocalObjectiveCenter()

vector SCR_CaptureAndHoldArea::GetLocalObjectiveCenter ( )
inlineprotected

Returns objective center in local space relative to the area.

Definition at line 155 of file SCR_CaptureAndHoldArea.c.

◆ GetOnTickInvoker()

CaptureAreaTickEvent SCR_CaptureAndHoldArea::GetOnTickInvoker ( )
inlineprotected

Returns invoker that is invoked when this area ticks (awards score).

Definition at line 134 of file SCR_CaptureAndHoldArea.c.

◆ GetScorePerTick()

int SCR_CaptureAndHoldArea::GetScorePerTick ( )
inlineprotected

Returns score awarded per area tick.

Definition at line 141 of file SCR_CaptureAndHoldArea.c.

◆ GetScoringSystemComponent()

SCR_BaseScoringSystemComponent SCR_CaptureAndHoldArea::GetScoringSystemComponent ( )
inlineprotected

Returns scoring system attached to current gamemode (if any) or null otherwise.

Definition at line 176 of file SCR_CaptureAndHoldArea.c.

◆ GetWorldObjectiveCenter()

vector SCR_CaptureAndHoldArea::GetWorldObjectiveCenter ( )
inlineprotected

Returns objective center in world space.

Definition at line 162 of file SCR_CaptureAndHoldArea.c.

◆ InitializeMapDescriptor()

void SCR_CaptureAndHoldArea::InitializeMapDescriptor ( SCR_MapDescriptorComponent target)
inlineprotected

Initializes objective map descriptor for this area.

Parameters
targetTarget map descriptor to initialize as this area

Definition at line 218 of file SCR_CaptureAndHoldArea.c.

◆ IsCharacterInside()

bool SCR_CaptureAndHoldArea::IsCharacterInside ( SCR_ChimeraCharacter character)
inlineprotected

Returns true if provided character is in this area. A character must have an affiliated faction using the FactionAffiliationComponent.

Definition at line 449 of file SCR_CaptureAndHoldArea.c.

◆ IsContested()

bool SCR_CaptureAndHoldArea::IsContested ( )
inlineprotected

Returns true if this area is being contested.

Definition at line 57 of file SCR_CaptureAndHoldArea.c.

◆ IsMajor()

bool SCR_CaptureAndHoldArea::IsMajor ( )
inlineprotected

Returns true if this area is marked as a major objective.

Definition at line 64 of file SCR_CaptureAndHoldArea.c.

◆ OnContestingFactionChanged()

event void SCR_CaptureAndHoldArea::OnContestingFactionChanged ( Faction previousFaction,
Faction newFaction )
inlineprotected

Occurs on change of contesting faction of the area.

Parameters
previousFactionFaction which contested the point prior to this change or null if none.
newFactionFaction that contests the point after this change or null if none.

Definition at line 466 of file SCR_CaptureAndHoldArea.c.

◆ OnFrame()

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

Updates the area and awards points if held.

Definition at line 284 of file SCR_CaptureAndHoldArea.c.

◆ OnInit()

override void SCR_CaptureAndHoldArea::OnInit ( IEntity owner)
inlineprotected

Initialize this area and register it to parent manager.

Definition at line 183 of file SCR_CaptureAndHoldArea.c.

◆ OnOwningFactionChanged()

override void SCR_CaptureAndHoldArea::OnOwningFactionChanged ( Faction previousFaction,
Faction newFaction )
inlineprotected

Occurs on change of owning faction of the area.

Parameters
previousFactionFaction which held the point prior to this change or null if none.
newFactionFaction that holds the point after this change or null if none.

Definition at line 476 of file SCR_CaptureAndHoldArea.c.

◆ OnTick()

void SCR_CaptureAndHoldArea::OnTick ( )
inlineprotected

Called when point ticks, ie. when score should be awarded Authority only.

Definition at line 320 of file SCR_CaptureAndHoldArea.c.

◆ Rpc_SetContestingFaction_BC()

void SCR_CaptureAndHoldArea::Rpc_SetContestingFaction_BC ( int previousFactionIndex,
int newFactionIndex )
inlineprotected

Notifies all clients of the owning faction change. Index of faction is -1 if null.

Definition at line 117 of file SCR_CaptureAndHoldArea.c.

◆ RplLoad()

override bool SCR_CaptureAndHoldArea::RplLoad ( ScriptBitReader reader)
inlineprotected

Called when Item is initialized from replication stream. Carries the data from Master.

Definition at line 71 of file SCR_CaptureAndHoldArea.c.

◆ RplSave()

override bool SCR_CaptureAndHoldArea::RplSave ( ScriptBitWriter writer)
inlineprotected

Called when Item is getting replicated from Master to Slave connection. The data will be delivered to Slave using RplInit method.

Definition at line 93 of file SCR_CaptureAndHoldArea.c.

◆ SetContestingFactionInternal()

void SCR_CaptureAndHoldArea::SetContestingFactionInternal ( Faction previousFaction,
Faction newFaction )
inlineprotected

Sets internal owner faction and raises corresponding callback.

Definition at line 107 of file SCR_CaptureAndHoldArea.c.

◆ UpdateMapDescriptor()

void SCR_CaptureAndHoldArea::UpdateMapDescriptor ( SCR_MapDescriptorComponent target)
inlineprotected

Updates objective map descriptor for this area with current state.

Parameters
targetTarget map descriptor to initialize as this area

Definition at line 247 of file SCR_CaptureAndHoldArea.c.

Member Data Documentation

◆ m_ContestingFaction

Faction SCR_CaptureAndHoldArea::m_ContestingFaction
protected

The faction that currently attacking/contesting this point in relation to the owner faction.

Definition at line 46 of file SCR_CaptureAndHoldArea.c.

◆ m_MapDescriptor

SCR_MapDescriptorComponent SCR_CaptureAndHoldArea::m_MapDescriptor
protected

Attached map descriptor component used for visualization (if any) or null if none.

Definition at line 43 of file SCR_CaptureAndHoldArea.c.

◆ m_OnTickEvent

ref CaptureAreaTickEvent SCR_CaptureAndHoldArea::m_OnTickEvent = new CaptureAreaTickEvent()
protected

Callback for when a tick event is raised by this area.

Definition at line 40 of file SCR_CaptureAndHoldArea.c.


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