The CharacterTracker keeps track of the quests associated with a QuestCharacter for a user.
public class CharacterTracker : Sansar.Script.InstanceInterfaceRemarks
There is as yet no way to create Quest Characters, but this functionality is coming soon.
Members at a glance
| Kind | Members |
|---|---|
| Properties | ActiveQuestCount · ActiveQuestDefinitions · AvailableQuestCount · AvailableQuestDefinitions · CanTurnInQuestCount · CanTurnInQuestDefinitions · SessionId |
| Methods | Subscribe · ToString · Update |
Properties
ActiveQuestCount
public int ActiveQuestCount { get; }Number of this character’s quests currently active for this user.
ActiveQuestDefinitions
public QuestDefinition[] ActiveQuestDefinitions { get; }Currently active quests.
AvailableQuestCount
public int AvailableQuestCount { get; }umber of this character’s quests currently available for this user.
AvailableQuestDefinitions
public QuestDefinition[] AvailableQuestDefinitions { get; }Quests that are available to be offered.
CanTurnInQuestCount
public int CanTurnInQuestCount { get; }umber of this character’s quests ready to be turned in for this user.
CanTurnInQuestDefinitions
public QuestDefinition[] CanTurnInQuestDefinitions { get; }Quests that are ready to be turned in to this character.
SessionId
public Sansar.Script.SessionId SessionId { get; }The session Id for the user being tracked.
Methods
Subscribe
public Sansar.Script.IEventSubscription Subscribe(
Action<CharacterTrackerData> callback,
bool persistent
)Subscribes to CharacterTracker Events.
| Parameter | Type | Description |
|---|---|---|
callback | Action<CharacterTrackerData> | Callback which is executed when the event completes. |
persistent | bool | Optional, set to false to unsubscribe after one event. |
Returns: Sansar.Script.IEventSubscription — An IEventSubscription that can be used to cancel the subscription.
ToString
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
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.
public void Update(
Action<Sansar.Script.OperationCompleteEvent> handler
)Update the CharacterTracker data.
| Parameter | Type | Description |
|---|---|---|
handler | Action<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.