Next: , Previous: Container Methods, Up: Core Methods



5.1.12 Player Methods

— Method on Player: init

Runs the init methods for Location and Mobile (in that order). Sets language and outputPort to nil.

— Method on Player: start modules outputPort realStart

Sets the outputPort object variable.

realStart is used to say that this is the real start call, rather then the normal one that happens when the object is created.

— Method on Player: stop

Nothing special here, except during upgrades.

— Method on Player: setStorage storage

Just used to set the storage attribute with a new capability set. Used for wizardry and dewizardry and the like.

— Method on Player: tell string language

Sends a string to the user. The string can either be a single string or a list of strings. Any individual string can be either a localized MOZ string or a single atom. If it is an atom, that atom is looked up on the LanguageStrings object and the result is output.

— Method on Player: setLanguage language

Standard variable set.

— Method on Player: getLanguage language

Standard variable get.

— Method on Player: setStorage storageRef

Standard variable set, for storageRef.

— Method on Player: grabInputUntil untilString inputString result

Takes all input entered by the player until the player types the string passed in untilString. The input is returned in inputString. result is as per usual.

This method can only be called once every thirty seconds, to prevent malicious code from not letting the player interact with the rest of the MOZ. Further attempts to call this method will return a failure result instantly.