Class Task
Tasks are executed by other tasks, clock timeouts, etc. Somewhat like a subroutine.
Tasks can contain conditions at start that if not met appear to prevent further execution of task.
Task name can also be used as a symbol to query if task has been triggered or not.
Provided conditions are met, commands under a task usually run once then end.
Repeating tasks execute (i.e. each command stays alive) until target task/variable completed.
Variables are a special task with no conditions or actions, just set/unset.
Assembly: Assembly-CSharp.dll
Syntax
Constructors
|
Improve this Doc
View Source
Task(Quest)
Declaration
public Task(Quest parentQuest)
Parameters
Type |
Name |
Description |
Quest |
parentQuest |
Parent quest.
|
|
Improve this Doc
View Source
Task(Quest, String[])
Create a task from QBN source code.
Declaration
public Task(Quest parentQuest, string[] lines)
Parameters
Type |
Name |
Description |
Quest |
parentQuest |
Parent quest.
|
String[] |
lines |
Source lines of task block.
|
|
Improve this Doc
View Source
Task(Quest, String[], Int32)
Global variable constructor.
Declaration
public Task(Quest parentQuest, string[] lines, int globalVar)
Parameters
Type |
Name |
Description |
Quest |
parentQuest |
Parent quest.
|
String[] |
lines |
Source lines of task block.
|
Int32 |
globalVar |
Global variable key.
|
Properties
|
Improve this Doc
View Source
Actions
Declaration
public IEnumerable<IQuestAction> Actions { get; }
Property Value
|
Improve this Doc
View Source
GlobalVarLink
Declaration
public int GlobalVarLink { get; }
Property Value
|
Improve this Doc
View Source
GlobalVarName
Declaration
public string GlobalVarName { get; }
Property Value
|
Improve this Doc
View Source
HasTriggerConditions
Declaration
public bool HasTriggerConditions { get; }
Property Value
|
Improve this Doc
View Source
IsDropped
Declaration
public bool IsDropped { get; }
Property Value
|
Improve this Doc
View Source
IsTriggered
Declaration
public bool IsTriggered { get; set; }
Property Value
|
Improve this Doc
View Source
ParentQuest
Declaration
public Quest ParentQuest { get; }
Property Value
|
Improve this Doc
View Source
Symbol
Declaration
public Symbol Symbol { get; set; }
Property Value
|
Improve this Doc
View Source
TargetSymbol
Declaration
public Symbol TargetSymbol { get; }
Property Value
|
Improve this Doc
View Source
Type
Declaration
public Task.TaskType Type { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddQuestAction(IQuestAction)
Declaration
public void AddQuestAction(IQuestAction questAction)
Parameters
|
Improve this Doc
View Source
Clear()
Another way to clear/rearm task.
Declaration
|
Improve this Doc
View Source
CopyQuestActions(Task)
Adds actions from existing task
Declaration
public void CopyQuestActions(Task other)
Parameters
Type |
Name |
Description |
Task |
other |
|
|
Improve this Doc
View Source
DisposeActions()
Called by parent quest when it ends so that all actions of this task can dispose themselves.
Declaration
public void DisposeActions()
|
Improve this Doc
View Source
Drop()
Permanently clear trigger state and drop task.
This is a one-way setting.
Declaration
|
Improve this Doc
View Source
GetSaveData()
Declaration
public Task.TaskSaveData_v1 GetSaveData()
Returns
|
Improve this Doc
View Source
GetTriggerValue()
Declaration
public bool GetTriggerValue()
Returns
|
Improve this Doc
View Source
RestoreSaveData(Task.TaskSaveData_v1)
Declaration
public void RestoreSaveData(Task.TaskSaveData_v1 data)
Parameters
|
Improve this Doc
View Source
SetTask(String[], Int32)
Declaration
public void SetTask(string[] lines, int globalVar = -1)
Parameters
|
Improve this Doc
View Source
SetTriggerValue(Boolean)
Declaration
public void SetTriggerValue(bool value)
Parameters
Type |
Name |
Description |
Boolean |
value |
|
|
Improve this Doc
View Source
Start()
Another way to start/trigger task.
Declaration
|
Improve this Doc
View Source
Update()
Declaration