Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Attributes | List of all members
SCR_CampaignDefendTask Interface Reference
Inheritance diagram for SCR_CampaignDefendTask:
[legend]

Public Member Functions

override void SetDescriptionWidgetText (notnull TextWidget textWidget, string taskText)
 
override void Finish (bool showMsg=true)
 Marks the task as finished.
 
override void Fail (bool showMsg=true)
 Fails the task.
 
bool IsCharacterInDefendTaskRange (notnull SCR_ChimeraCharacter character, SCR_CampaignDefendTaskSupportEntity supportClass=null)
 
void PeriodicalCheck ()
 
void OnCharacterDeath (SCR_ChimeraCharacter character)
 
void OnBaseCaptured (SCR_MilitaryBaseComponent base, Faction faction)
 An event called when a base has been captured.
 
override string GetMapDescriptorText ()
 
void SCR_CampaignDefendTask (IEntitySource src, IEntity parent)
 
void ~SCR_CampaignDefendTask (string description)
 
- Public Member Functions inherited from SCR_CampaignBaseTask
int GetTargetBaseId ()
 
void SetTargetBase (notnull SCR_CampaignMilitaryBaseComponent targetBase)
 Sets the base that is marked as the target of this task.
 
void OnMapOpenCallback (MapConfiguration config)
 
void OnMapZoom (float pixelPerUnit)
 
void SetOffset ()
 
float CalculateOffset ()
 
string GetBaseNameWithCallsign ()
 
SCR_CampaignMilitaryBaseComponent GetTargetBase ()
 Returns the base that is marked as target of this task.
 
override void Deserialize (ScriptBitReader reader)
 
override void Serialize (ScriptBitWriter writer)
 
- Public Member Functions inherited from SCR_BaseTask
void OnDelete ()
 
bool NotifyAssignment ()
 
bool NotifyUnassign ()
 
void DoNotifyAssignment (int assigneeID)
 
void DoNotifyUnassign (int assigneeID)
 
SCR_ERadioMsg GetAssignMessage ()
 
SCR_ERadioMsg GetUnassignMessage ()
 
ResourceName GetMapUIElementResourceName ()
 
string GetMapDescriptorText ()
 
void OnMapOpen (MapConfiguration config)
 
void OnHoverItem (MapItem item)
 
string GetFullTaskIconName ()
 
string GetTaskMapIconName ()
 
string GetTaskListIconNamePrefix ()
 
string GetTaskListIconName ()
 
string GetTaskListTaskTitle ()
 
string GetMajorModifier ()
 
string GetTaskListTaskText ()
 
Widget GetParentWidget (notnull Widget rootWidget)
 
ResourceName GetIconImageset ()
 
void SetHUDIcon ()
 
void SetWidgetIcon (ImageWidget image)
 
void ClearWidgetIcon ()
 Remove icon assigned to this task.
 
void UpdateMapTaskIcon ()
 
void UpdatePriorityMapTaskIcon ()
 
bool AssignTaskToAI (AIAgent agent)
 
string GetIconName ()
 
ResourceName GetImageSetName ()
 
string GetIconSuffix ()
 
string GetTitleIconString ()
 
void SetTitleWidgetText (notnull TextWidget textWidget, string taskText)
 
string GetTitleText ()
 
void SetDescriptionWidgetText (notnull TextWidget textWidget, string taskText)
 
Widget GenerateTaskDescriptionUI (notnull Widget rootWidget, array< Widget > widgets)
 
void UpdateTaskListAssignee ()
 
void OnAssigneeKilled ()
 
void CreateMapUIIcon ()
 
Faction GetTargetFaction ()
 Returns the faction that should complete this task.
 
void SetTargetFaction (Faction targetFaction)
 Sets the faction that should complete this task.
 
string GetFinishText ()
 Returns a text informing about the task being finished.
 
bool IsAssigned ()
 Returns whether the task is assigned to someone or not.
 
string GetAllAssigneeNamesString ()
 Returns a string with all the assignees on this task in following format: "PlayerA, PlayerB, ..., PlayerN".
 
void CheckAssigneeTimeout ()
 Checks all the assignees for timeout, if their time is up, they get unassigned.
 
void SetLastAssigneeAddedTimestamp (float timestamp)
 
void SetIndividual (bool individual)
 Set this task as task for an individual.
 
bool IsIndividual ()
 Returns whether this task is for an individual or not.
 
void SetIsPriority (bool isPrio)
 
bool IsPriority ()
 
bool IsAssignable ()
 
bool CanBeAssigned (out SCR_ECannotAssignReasons reason, int playerID=-1)
 Returns whether this task can be assigned to the player with the given player ID If playerID == -1, the local player is used as the target.
 
float GetLastAssigneeAddedTimestamp ()
 Returns the timestamp of last add assignee event.
 
float GetAssigneeTimeLeft ()
 Returns time left the assignee of this task has to finish it, after that they get automatically unassigned.
 
void SetTaskID (int taskID)
 Sets an ID of this task.
 
int GetTaskID ()
 Returns an ID of this task.
 
SCR_TaskState GetTaskState ()
 Returns the state of this task.
 
void SetTitle (string title)
 
string GetTitle ()
 Return the title of this task.
 
void SetDescription (string description)
 
string GetDescription ()
 Return the description of this task.
 
SCR_BaseTaskExecutor GetAssignee ()
 Returns the first assignee of this task.
 
int GetAssignees (out array< SCR_BaseTaskExecutor > assignees)
 Returns assignees of this task.
 
int GetAssigneeCount ()
 
void Cancel (bool showMsg=true)
 
void Remove ()
 Marks the task as removed.
 
void Create (bool showMsg=true)
 When the task is created.
 
void Finish (bool showMsg=true)
 Marks the task as finished.
 
void Fail (bool showMsg=true)
 Fails the task.
 
void RemoveAllAssignees ()
 Removes every assignee from this task.
 
void RemoveAssignee (SCR_BaseTaskExecutor assignee, SCR_EUnassignReason reason)
 Removes an assignee, specified as a parameter, from this task.
 
void AddAssignee (SCR_BaseTaskExecutor assignee, float timestamp)
 Adds a new assignee, specified as a parameter, to this task.
 
void InitOnSpawn (int pid, IEntity ent)
 
void ToggleHUDIcon (bool show, bool fade=true)
 
void UpdateHUDIcon ()
 
Widget GetTaskIconkWidget ()
 
void SetTaskIconWidget (Widget w)
 
void SetState (SCR_TaskState state)
 Changes the state of this task to the parameter.
 
void RegisterTaskUpdate (SCR_ETaskEventMask TaskEventMask)
 Registers task event mask for OnTaskUpdate.
 
void Serialize (ScriptBitWriter writer)
 
void Deserialize (ScriptBitReader reader)
 
override void EOnInit (IEntity owner)
 
void SCR_BaseTask (IEntitySource src, IEntity parent)
 
void ~SCR_BaseTask ()
 

Static Public Member Functions

static float GetMinAllyDistance ()
 
static float GetMaxAllyDistance ()
 
static float GetMinEnemyDistance ()
 
static float GetMaxEnemyDistance ()
 
static SCR_CampaignDefendTask FindDefendTask (SCR_CampaignMilitaryBaseComponent targetBase, SCR_CampaignFaction targetFaction)
 
static SCR_CampaignMilitaryBaseComponent FindClosestFriendlyBase (notnull IEntity controlledEntity, notnull Faction faction)
 
static bool CheckDefendRequestConditions (notnull SCR_PlayerController playerController, out SCR_CampaignMilitaryBaseComponent closestBase)
 
static bool FindEnemyPresence (notnull SCR_CampaignMilitaryBaseComponent base, notnull SCR_CampaignFaction alliedFaction, bool initialCheck=true)
 Set initialCheck to false if the task is already created for this base.
 
static bool IsCharacterInAnyDefendTaskRange (SCR_ChimeraCharacter character)
 

Static Public Attributes

static const float DEFEND_TASK_DEFAULT_MIN_ALLY_DISTANCE = 300
 
static const float DEFEND_TASK_DEFAULT_MAX_ALLY_DISTANCE = 400
 
static const float DEFEND_TASK_DEFAULT_MIN_ENEMY_DISTANCE = 300
 
static const float DEFEND_TASK_DEFAULT_MAX_ENEMY_DISTANCE = 400
 
- Static Public Attributes inherited from SCR_CampaignBaseTask
const int MIN_OFFSET = 3
 
const int MAX_OFFSET = 80
 
- Static Public Attributes inherited from SCR_BaseTask
static const string TASK_AMOUNT_COMPLETED_TEXT = "#AR-Tasks_AmountCompleted"
 
static const string TASK_PROGRESS_TEXT = "#AR-Tasks_StatusProgress-UC"
 
static const string TASK_FINISHED_TEXT = "#AR-Tasks_StatusFinished-UC"
 
static const string TASK_AVAILABLE_TEXT = "#AR-Tasks_StatusNew-UC"
 
static const string TASK_HINT_TEXT = "#AR-Tasks_Hint"
 
static const string TASK_CANCELLED_TEXT = "#AR-Tasks_StatusCancelled-UC"
 
static const string TASK_COMPLETED_TEXT = "#AR-Tasks_StatusCompleted-UC"
 
static const string TASK_FAILED_TEXT = "#AR-Tasks_StatusFailed-UC"
 
static const float DEFAULT_ASSIGNEE_TIME_LIMIT = 1800
 
static const float DEFAULT_ASSIGNEE_TIMEOUT_TIME = 60
 
static const int INVALID_TIMESTAMP = -1
 
static const int INVALID_TASK_ID = -1
 
static int s_iCurrentTaskID = 0
 
const string TASK_BG_M = "Icon_M_Task_BG"
 
const string TASK_O_M = "Icon_M_Task_Outline"
 
const string TASK_BG = "Icon_Task_BG"
 
const string TASK_O = "Icon_Task_Outline"
 
const string TASK_H = "Icon_M_Task_Hover"
 
const string Task_S = "TaskIconSymbol"
 

Protected Member Functions

override void UpdateMapInfo ()
 
override void ShowAvailableTask (bool afterAssigneeRemoved=false)
 Shows a message about this task being available again.
 
override void ShowTaskProgress (bool showMsg=true)
 
override void UpdateMapInfo ()
 
- Protected Member Functions inherited from SCR_BaseTask
void ShowPopUpNotification (string subtitle)
 
void UpdateMapInfo ()
 
bool DoneByAssignee ()
 
void ShowTaskProgress (bool showMsg=true)
 
void ShowAvailableTask (bool afterAssigneeRemoved=false)
 Shows a message informing about this task being available.
 
bool IsAssignedToLocalPlayer ()
 Returns whether this task is assigned to the local player.
 
void OnAssigneeRemoved (SCR_BaseTaskExecutor oldAssignee)
 An event called when an assignee has been removed from this task.
 
void OnAssigneeAdded (SCR_BaseTaskExecutor newAssignee)
 An event called when a new assignee has been added to this task.
 
void OnStateChanged (SCR_TaskState previousState, SCR_TaskState newState)
 An event called when the state of this task has been changed.
 

Static Protected Attributes

static SCR_CampaignMilitaryBaseComponent s_ClosestBase
 
- Static Protected Attributes inherited from SCR_BaseTask
static const float PLATFORM_ICON_SIZE = 2
 

Additional Inherited Members

- Protected Attributes inherited from SCR_CampaignBaseTask
SCR_CampaignMilitaryBaseComponent m_TargetBase = null
 
int m_iTargetBaseId = -1
 
- Protected Attributes inherited from SCR_BaseTask
string m_sName
 
string m_sDescription
 
bool m_bAssignable
 
bool m_bIndividualTask
 
string m_sMapIconName
 
string m_sTaskListIconNamePrefix
 
string m_sTaskListIconName
 
string m_sMajorModifier
 
ResourceName m_sMapUIElementResourceName
 
ResourceName m_sIconImageset
 
SCR_ERadioMsg m_eAssignMessage
 
bool m_bNotifyAssignment
 
SCR_ERadioMsg m_eUnassignMessage
 
bool m_bNotifyUnassign
 
ResourceName m_sHUDIcon
 
Faction m_TargetFaction = null
 
int m_iTaskID = INVALID_TASK_ID
 
float m_fAssigneeTimeLimit = DEFAULT_ASSIGNEE_TIME_LIMIT
 
float m_fLastAssigneeAddedTimestamp = INVALID_TIMESTAMP
 
ref array< SCR_BaseTaskExecutorm_aAssignees = new array<SCR_BaseTaskExecutor>()
 
SCR_TaskState m_eState
 
SCR_BaseTaskExecutor m_TimedOutAssignee = null
 
float m_fAssigneeTimeoutTimestamp = INVALID_TIMESTAMP
 
SCR_MapDescriptorComponent m_MapDescriptor
 
ImageWidget m_wHUDIcon
 
Widget m_wMapTaskIcon
 
Widget m_wTaskListDescription
 
bool m_bIsPriority
 
SCR_PlayerFactionAffiliationComponent m_sPlyFactionAffilComp
 
float m_fMajorSize = 80
 

Constructor & Destructor Documentation

◆ SCR_CampaignDefendTask()

void SCR_CampaignDefendTask.SCR_CampaignDefendTask ( IEntitySource  src,
IEntity  parent 
)

◆ ~SCR_CampaignDefendTask()

void SCR_CampaignDefendTask.~SCR_CampaignDefendTask ( string  description)

Member Function Documentation

◆ CheckDefendRequestConditions()

static bool SCR_CampaignDefendTask.CheckDefendRequestConditions ( notnull SCR_PlayerController  playerController,
out SCR_CampaignMilitaryBaseComponent  closestBase 
)
static

◆ Fail()

override void SCR_CampaignDefendTask.Fail ( bool  showMsg = true)

Fails the task.

Implements SCR_BaseTask.

◆ FindClosestFriendlyBase()

static SCR_CampaignMilitaryBaseComponent SCR_CampaignDefendTask.FindClosestFriendlyBase ( notnull IEntity  controlledEntity,
notnull Faction  faction 
)
static

◆ FindDefendTask()

static SCR_CampaignDefendTask SCR_CampaignDefendTask.FindDefendTask ( SCR_CampaignMilitaryBaseComponent  targetBase,
SCR_CampaignFaction  targetFaction 
)
static

◆ FindEnemyPresence()

static bool SCR_CampaignDefendTask.FindEnemyPresence ( notnull SCR_CampaignMilitaryBaseComponent  base,
notnull SCR_CampaignFaction  alliedFaction,
bool  initialCheck = true 
)
static

Set initialCheck to false if the task is already created for this base.

◆ Finish()

override void SCR_CampaignDefendTask.Finish ( bool  showMsg = true)

Marks the task as finished.

Implements SCR_BaseTask.

◆ GetMapDescriptorText()

override string SCR_CampaignDefendTask.GetMapDescriptorText ( )

Implements SCR_BaseTask.

◆ GetMaxAllyDistance()

static float SCR_CampaignDefendTask.GetMaxAllyDistance ( )
static

◆ GetMaxEnemyDistance()

static float SCR_CampaignDefendTask.GetMaxEnemyDistance ( )
static

◆ GetMinAllyDistance()

static float SCR_CampaignDefendTask.GetMinAllyDistance ( )
static

◆ GetMinEnemyDistance()

static float SCR_CampaignDefendTask.GetMinEnemyDistance ( )
static

◆ IsCharacterInAnyDefendTaskRange()

static bool SCR_CampaignDefendTask.IsCharacterInAnyDefendTaskRange ( SCR_ChimeraCharacter  character)
static

◆ IsCharacterInDefendTaskRange()

bool SCR_CampaignDefendTask.IsCharacterInDefendTaskRange ( notnull SCR_ChimeraCharacter  character,
SCR_CampaignDefendTaskSupportEntity  supportClass = null 
)

◆ OnBaseCaptured()

void SCR_CampaignDefendTask.OnBaseCaptured ( SCR_MilitaryBaseComponent  base,
Faction  faction 
)

An event called when a base has been captured.

◆ OnCharacterDeath()

void SCR_CampaignDefendTask.OnCharacterDeath ( SCR_ChimeraCharacter  character)

◆ PeriodicalCheck()

void SCR_CampaignDefendTask.PeriodicalCheck ( )

◆ SetDescriptionWidgetText()

override void SCR_CampaignDefendTask.SetDescriptionWidgetText ( notnull TextWidget  textWidget,
string  taskText 
)

Implements SCR_BaseTask.

◆ ShowAvailableTask()

override void SCR_CampaignDefendTask.ShowAvailableTask ( bool  afterAssigneeRemoved = false)
protected

Shows a message about this task being available again.

Implements SCR_BaseTask.

◆ ShowTaskProgress()

override void SCR_CampaignDefendTask.ShowTaskProgress ( bool  showMsg = true)
protected

Implements SCR_BaseTask.

◆ UpdateMapInfo()

override void SCR_CampaignDefendTask.UpdateMapInfo ( )
protected

Implements SCR_CampaignBaseTask.

Member Data Documentation

◆ DEFEND_TASK_DEFAULT_MAX_ALLY_DISTANCE

const float SCR_CampaignDefendTask.DEFEND_TASK_DEFAULT_MAX_ALLY_DISTANCE = 400
static

◆ DEFEND_TASK_DEFAULT_MAX_ENEMY_DISTANCE

const float SCR_CampaignDefendTask.DEFEND_TASK_DEFAULT_MAX_ENEMY_DISTANCE = 400
static

◆ DEFEND_TASK_DEFAULT_MIN_ALLY_DISTANCE

const float SCR_CampaignDefendTask.DEFEND_TASK_DEFAULT_MIN_ALLY_DISTANCE = 300
static

◆ DEFEND_TASK_DEFAULT_MIN_ENEMY_DISTANCE

const float SCR_CampaignDefendTask.DEFEND_TASK_DEFAULT_MIN_ENEMY_DISTANCE = 300
static

◆ s_ClosestBase

SCR_CampaignMilitaryBaseComponent SCR_CampaignDefendTask.s_ClosestBase
staticprotected

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