Skip to content

Get Sansar

Script API

QuestDefinition

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Class Namespace Sansar.Simulation Inherits Sansar.Script.InstanceInterface Added in 34.7.0

The QuestDefinition stores the data that is used to create quest instances for users.

public class QuestDefinition : Sansar.Script.InstanceInterface

Members at a glance

KindMembers
PropertiesDescription · ObjectiveDefinitions · Ready · Title
MethodsGetQuest · ToString · Update

Properties

Description

Added in 34.7.0
public string Description { get; }

The description of this quest.

ObjectiveDefinitions

Added in 34.7.0
public ObjectiveDefinition[] ObjectiveDefinitions { get; }

All the ObjectiveDefinitions for this QuestDefinition.

Remarks

The ObjectiveDefinitions for this QuestDefinition

Ready

Added in 34.7.0
public bool Ready { get; }

If the QuestDefinition data is ready.

Remarks

Returns false until the data has been fetched from the quest service. Once it returns true it will always return true.

Title

Added in 34.7.0
public string Title { get; }

The title of this quest.

Methods

GetQuest

Added in 34.7.0
public void GetQuest(Sansar.Script.SessionId agent)

Get the state of this quest for a particular user.

ParameterTypeDescription
agentSansar.Script.SessionIdThe SessionId of the user.
Added in 34.7.0
public void GetQuest(AgentPrivate agent)

Get the state of this quest for a particular user.

ParameterTypeDescription
agentAgentPrivateObtain the quest state for this user.
Added in 34.7.0
public void GetQuest(     Sansar.Script.SessionId agent,     Action<QuestDefinition.GetQuestData> handler )

Get the state of this quest for a particular user.

ParameterTypeDescription
agentSansar.Script.SessionIdThe SessionId of the user.
handlerAction<QuestDefinition.GetQuestData>Handler to be called when the event completes.
Added in 34.7.0
public void GetQuest(     AgentPrivate agent,     Action<QuestDefinition.GetQuestData> handler )

Get the state of this quest for a particular user.

ParameterTypeDescription
agentAgentPrivateObtain the quest state for this user.
handlerAction<QuestDefinition.GetQuestData>Handler to be called when the event completes.

ToString

Added in 34.7.0
public override string ToString()

A string representation of this object.

Returns: string — A string representation of this object.

Remarks

The format of this string may change between releases.

Update

Added in 34.7.0
public void Update()

Update the QuestDefinition data.

Remarks

Use in a WaitFor to wait for the data for the QuestDefinition to be ready. Once data is retrieved and Ready is true it will never again be false.

Added in 34.7.0
public void Update(     Action<Sansar.Script.OperationCompleteEvent> handler )

Update the QuestDefinition data.

ParameterTypeDescription
handlerAction<Sansar.Script.OperationCompleteEvent>Handler to be called when the event completes.
Remarks

Use in a WaitFor to wait for the data for the QuestDefinition to be ready. Once data is retrieved and Ready is true it will never again be false.

Used in examples

Generated from the Sansar 47.10.0 client ScriptApi snapshot.