Difference between revisions of "PlayerExtended"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the PlayerExtended class)
(Documentation for the PlayerExtended class)
 
Line 54: Line 54:
  
 
===Methods===
 
===Methods===
 +
:{{CSharp|void AbandonQuest(string identifier)}}
 +
::
 +
::Attempts to abandon the specified [[Game_Cloud#Quests|Quest]] for this participant.
 +
 +
:{{CSharp|void Dialog(string identifier, JSFlexibleFunction callback, string title {{=}} NULL, string[] choices {{=}} NULL)}}
 +
::
 +
::Opens a GameCloud conversation window with the specified admin-defined dialog. You may override (or provide) run-time response choices. Your callback method will be called with the index of the choice selected (or -1 if the dialog is cancelled)
 +
 +
:{{CSharp|bool EligibleForQuest(string identifier)}}
 +
::
 +
::Returns true if this participant is elligible for the specified [[Game_Cloud#Quests|Quest]]
 +
 +
:{{CSharp|void FirePlayerEvent(string identifier)}}
 +
::
 +
::Fires the specified GameCloud Event for this participant. This may cause [[Game_Cloud#Achievements|Achievement]] or [[Game_Cloud#Quests|Quest]] objectives to be fulfilled.
 +
 +
:{{CSharp|string GetQuestStep(string identifier)}}
 +
::
 +
::Returns the player's current step on the the specified [[Game_Cloud#Quests|Quest]]. Null if they're not on the quest.
 +
 +
:{{CSharp|bool HasAchievement(string achievementIdentifier)}}
 +
::
 +
::Checks to see if an achievement has been completed (won)
 +
 +
:{{CSharp|bool HasQuest(string identifier)}}
 +
::
 +
::Returns true if this participant is on the specified [[Game_Cloud#Quests|Quest]]
 +
 
:{{CSharp|bool IsUnlocked(string lockIdentifier)}}
 
:{{CSharp|bool IsUnlocked(string lockIdentifier)}}
 
::
 
::
 
::Checks to see if a feature has been unlocked (all the conditions or steps for a GameCloud lock have been met) for this player
 
::Checks to see if a feature has been unlocked (all the conditions or steps for a GameCloud lock have been met) for this player
 +
 +
:{{CSharp|bool StartQuest(string identifier, JSFlexibleFunction success {{=}} NULL, JSFlexibleFunction failure {{=}} NULL)}}
 +
::
 +
::Attempts to start this participant on the specified [[Game_Cloud#Quests|Quest]]
  
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__

Latest revision as of 15:35, 20 September 2019

Represents a Player, which is the GameCloud's representation of a connected user, the quests progress, achievements, advancement, etc.

  • This is a JavaScript visible object

Remarks [edit]

Properties

ParticipantExtended Participant {get;}
Gets the participant for this player

Events

OnAchievementWon(PlayerExtended player, String identifier)
Parameters:
player : This player
identifier : The Achievement Identifier
Fires when the player wins an achievement
OnQuestAbandoned(PlayerExtended player, String identifier)
Parameters:
player : This player
identifier : The Quest Identifier
Fires when the player abandons (quits) a quest
OnQuestAdvanced(PlayerExtended player, String identifier)
Parameters:
player : This player
identifier : The Quest Identifier
Fires when the player makes progress toward a quest (advances to the next step).
OnQuestCompleted(PlayerExtended player, String identifier)
Parameters:
player : This player
identifier : The Quest Identifier
Fires when the player completes a quest (successfully)
OnQuestStarted(PlayerExtended player, String identifier)
Parameters:
player : This player
identifier : The Quest Identifier
Fires when the player starts a new quest
OnUnlock(PlayerExtended player, String identifier)
Parameters:
player : This player
identifier : The Lock Identifier
Fires when the player unlocks a feature lock

Methods

void AbandonQuest(string identifier)
Attempts to abandon the specified Quest for this participant.
void Dialog(string identifier, JSFlexibleFunction callback, string title = NULL, string[] choices = NULL)
Opens a GameCloud conversation window with the specified admin-defined dialog. You may override (or provide) run-time response choices. Your callback method will be called with the index of the choice selected (or -1 if the dialog is cancelled)
bool EligibleForQuest(string identifier)
Returns true if this participant is elligible for the specified Quest
void FirePlayerEvent(string identifier)
Fires the specified GameCloud Event for this participant. This may cause Achievement or Quest objectives to be fulfilled.
string GetQuestStep(string identifier)
Returns the player's current step on the the specified Quest. Null if they're not on the quest.
bool HasAchievement(string achievementIdentifier)
Checks to see if an achievement has been completed (won)
bool HasQuest(string identifier)
Returns true if this participant is on the specified Quest
bool IsUnlocked(string lockIdentifier)
Checks to see if a feature has been unlocked (all the conditions or steps for a GameCloud lock have been met) for this player
bool StartQuest(string identifier, JSFlexibleFunction success = NULL, JSFlexibleFunction failure = NULL)
Attempts to start this participant on the specified Quest