Skip to content

Get Sansar

Script API

CharacterTracker

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 36.0.1

The CharacterTracker keeps track of the quests associated with a QuestCharacter for a user.

public class CharacterTracker : Sansar.Script.InstanceInterface

Remarks

There is as yet no way to create Quest Characters, but this functionality is coming soon.

Members at a glance

KindMembers
PropertiesActiveQuestCount · ActiveQuestDefinitions · AvailableQuestCount · AvailableQuestDefinitions · CanTurnInQuestCount · CanTurnInQuestDefinitions · SessionId
MethodsSubscribe · ToString · Update

Properties

ActiveQuestCount

Added in 36.7.0
public int ActiveQuestCount { get; }

Number of this character’s quests currently active for this user.

ActiveQuestDefinitions

Added in 36.5.0
public QuestDefinition[] ActiveQuestDefinitions { get; }

Currently active quests.

AvailableQuestCount

Added in 36.7.0
public int AvailableQuestCount { get; }

umber of this character’s quests currently available for this user.

AvailableQuestDefinitions

Added in 36.5.0
public QuestDefinition[] AvailableQuestDefinitions { get; }

Quests that are available to be offered.

CanTurnInQuestCount

Added in 36.7.0
public int CanTurnInQuestCount { get; }

umber of this character’s quests ready to be turned in for this user.

CanTurnInQuestDefinitions

Added in 36.5.0
public QuestDefinition[] CanTurnInQuestDefinitions { get; }

Quests that are ready to be turned in to this character.

SessionId

Added in 36.0.1
public Sansar.Script.SessionId SessionId { get; }

The session Id for the user being tracked.

Methods

Subscribe

Added in 36.0.1
public Sansar.Script.IEventSubscription Subscribe(     Action<CharacterTrackerData> callback,     bool persistent )

Subscribes to CharacterTracker Events.

ParameterTypeDescription
callbackAction<CharacterTrackerData>Callback which is executed when the event completes.
persistentboolOptional, set to false to unsubscribe after one event.

Returns: Sansar.Script.IEventSubscription — An IEventSubscription that can be used to cancel the subscription.

ToString

Added in 36.0.1
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 36.0.1
public void Update()

Update the CharacterTracker data.

Remarks

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

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

Update the CharacterTracker 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 CharacterTracker 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.