Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
Tutorial showing a list of general functions. tutorial, custom code, public functions, asset verbs

Public Functions:Asset Verb Functions

  • MyGame.$("asset").hasQuirk("verb_means_action")   Boolean This method returns a boolean indicating whether the asset has the specified verb quirk.
  • MyGame.$('asset').getQuirks()   Object This method returns a list of the asset's verb quirks.
  • MyGame.$("asset").$didDo("verb name") {String} the name of a verb Boolean This method asks whether the specified verb has ever been successfully applied to the specified asset as a direct object. Useful for writing one-time-use logic.
  • MyGame.$("asset").$didTry("verb name") {String} the name of a verb Boolean This method asks whether the specified verb has ever been attempted on the specified asset as a direct object. This will return true regardless if the verb attempt failed or succeeded.
  • MyGame.$("asset").$doCount("verb name") {String} the name of a verb Int This method asks how many times the specified verb has been successfully applied to the specified asset as a direct object. Useful for writing do-on-nth-time logic.
  • MyGame.$("asset").$tryCount("verb name") {String} the name of a verb Int This method asks how many times the specified verb has been attempted on the specified asset as a direct object. Useful for writing do-on-nth-time logic. The count includes both failures and successes.
  • MyGame.$("asset").iDidVerb("verb name") {String} the name of a verb Boolean This method asks whether the specified verb has ever successfully used the specified asset as a indirect object. Useful for writing one-time-use logic.
  • MyGame.$("asset").$iDidTry("verb name") {String} the name of a verb Boolean This method asks whether the specified verb has ever attempted to use the specified asset as a indirect object. This will return true regardless if the verb attempt failed or succeeded.
  • MyGame.$("asset").$iDoCount("verb name") {String} the name of a verb Int This method asks how many times the specified verb has successfully used the specified asset as an indirect object. Useful for writing do-on-nth-time logic.
  • MyGame.$("asset").$iTryCount("verb name") {String} the name of a verb Int This method asks how many times the specified verb has attempted to use the specified asset as an indirect object. Useful for writing do-on-nth-time logic. The count includes both failures and successes.