PlayerExtended
From Virtual World Web Wiki
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
- Parameters:
- OnQuestAbandoned(PlayerExtended player, String identifier)
- Parameters:
- player : This player
- identifier : The Quest Identifier
- Fires when the player abandons (quits) a quest
- Parameters:
- 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).
- Parameters:
- OnQuestCompleted(PlayerExtended player, String identifier)
- Parameters:
- player : This player
- identifier : The Quest Identifier
- Fires when the player completes a quest (successfully)
- Parameters:
- OnQuestStarted(PlayerExtended player, String identifier)
- Parameters:
- player : This player
- identifier : The Quest Identifier
- Fires when the player starts a new quest
- Parameters:
- OnUnlock(PlayerExtended player, String identifier)
- Parameters:
- player : This player
- identifier : The Lock Identifier
- Fires when the player unlocks a feature lock
- Parameters:
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