World Scripting Reference
Contents
- 1 Creating A Server Script
- 2 Script Examples
- 3 JavaScript Server Globals
- 4 JavaScript Server Objects
- 4.1 Remarks [edit]
- 4.2 AbilityExtended (Full Article)
- 4.3 AbilityGroupExtended (Full Article)
- 4.4 AbilitySetExtended (Full Article)
- 4.5 ChatChannelExtended (Full Article)
- 4.6 ChatMessageEventArgsExtended (Full Article)
- 4.7 DOMPropertiesExtended (Full Article)
- 4.8 InteractionMappingExtended (Full Article)
- 4.9 ParticipantExtended (Full Article)
- 4.10 ViewAbilityExtended (Full Article)
- 4.11 ViewExtended (Full Article)
- 5 JavaScript Component Globals
- 6 JavaScript Component Objects
- 6.1 Remarks [edit]
- 6.2 ActorExtended (Full Article)
- 6.3 AvatarActorExtended (Full Article)
- 6.4 AvatarExtended (Full Article)
- 6.5 AvatarLayerExtended (Full Article)
- 6.6 CloudCurrencyExtended (Full Article)
- 6.7 ConfirmationHandleExtended (Full Article)
- 6.8 CreatureActorExtended (Full Article)
- 6.9 CreatureAvatarExtended (Full Article)
- 6.10 EngagementControlExtended (Full Article)
- 6.11 EngagementExtended (Full Article)
- 6.12 EngagementStateExtended (Full Article)
- 6.13 ListingInfoExtended (Full Article)
- 6.14 PersonaAvatarExtended (Full Article)
- 6.15 PersonaLayerExtended (Full Article)
- 6.16 PlayerActorExtended (Full Article)
- 6.17 PlayerAvatarExtended (Full Article)
- 6.18 PlayerExtended (Full Article)
- 6.19 RuntimeLayerExtended (Full Article)
- 7 JavaScript DOM Nodes
- 7.1 Remarks [edit]
- 7.2 DOMAnimationExtended (Full Article)
- 7.3 DOMControllerExtended (Full Article)
- 7.4 DOMCurveExtended (Full Article)
- 7.5 DOMCurveKeyframeExtended (Full Article)
- 7.6 DOMCurvePlayerExtended (Full Article)
- 7.7 DOMDocumentExtended (Full Article)
- 7.8 DOMGeometryExtended (Full Article)
- 7.9 DOMLightExtended (Full Article)
- 7.10 DOMObjectExtended (Full Article)
- 7.11 DOMPhysicsApproachExtended (Full Article)
- 7.12 DOMPhysicsExtended (Full Article)
- 7.13 DOMPhysicsFaceExtended (Full Article)
- 7.14 DOMPhysicsFacePointExtended (Full Article)
- 7.15 DOMPhysicsFaceTargetExtended (Full Article)
- 7.16 DOMPhysicsFollowExtended (Full Article)
- 7.17 DOMPhysicsOperationExtended (Full Article)
- 7.18 DOMPhysicsPathingExtended (Full Article)
- 7.19 DOMPhysicsPathToExtended (Full Article)
- 7.20 DOMPhysicsPursueExtended (Full Article)
- 7.21 DOMPhysicsSpawnAreaExtended (Full Article)
- 7.22 DOMPhysicsSpawnAtExtended (Full Article)
- 7.23 DOMPhysicsSpawnExtended (Full Article)
- 7.24 DOMRenderableExtended (Full Article)
- 7.25 DOMSceneDocumentExtended (Full Article)
- 7.26 DOMScriptExtended (Full Article)
- 7.27 DOMTransformExtended (Full Article)
- 7.28 DOMVolumeExtended (Full Article)
This page is part of the Infrastructure Guide. Here we'll describe the various objects you'll work with from in the server JavaScript scripting environment, as well as provide step by step instructions to help you create your first server script, and examples of working scripts you can use on your server.
Creating A Server Script
TODO: make a tutorial explaining how to make, upload, and debug a server script
Script Examples
TODO: make a table of script examples with the link in the first column, and a quick description in the second. The links can go to pages with the full source
JavaScript Server Globals
Remarks [edit]
These objects are created by the core, and are always available to server scripts. An instance of each can be accessed at the global scope. For example, a script can access DOM.Self
to get a reference to the DOMScript node on which the script is running.
Chat Global (Full Article)
The Chat JavaScript global object is available from server world scripts and provides methods for working with chat channels
DOM Global (Full Article)
The DOM JavaScript global object is available from server world scripts and is the main entry point to the Document Object Model
Instance Global (Full Article)
The Instance JavaScript global is available in server world scripts and provides access to the server instance in which the script is running.
Log Global (Full Article)
The Log JavaScript global object is available from server world scripts and provides methods for writing to the script debug log
Physics Global (Full Article)
The Physics JavaScript global object is available from server world scripts and provides methods for launching physics operations
System Global (Full Article)
The System JavaScript Global object is available from server world scripts and provides utility methods for ineter-script communication among other things
JavaScript Server Objects
Remarks [edit]
These are JavaScript wrappers for C# objects that can be passed down into JavaScript as return value of a function call or as the parameter to an event or callback method.
AbilityExtended (Full Article)
Represents a user ability
AbilityGroupExtended (Full Article)
Represents a user ability group
AbilitySetExtended (Full Article)
Represents a user ability set
ChatChannelExtended (Full Article)
ChatMessageEventArgsExtended (Full Article)
Represents a chat message
DOMPropertiesExtended (Full Article)
Represents the property collection on a DOMObject
InteractionMappingExtended (Full Article)
Represents a mapping between an ability and nodes in the DOM for which the ability should be an Interaction
ParticipantExtended (Full Article)
Represents a participant in an instance. A participant is the owner of a connection's current avatar in an instance of a scene. It represents the user's actions in the instance, and is the source of interaction events like mouse clicks.
ViewAbilityExtended (Full Article)
Represents a runtime ability created in the view
ViewExtended (Full Article)
Represents a View which hosts live DOM
JavaScript Component Globals
Remarks [edit]
These object templates are created by components, and are always available to server scripts as long as the associated component is installed. As with system global objects, an instance of each is created with the same name as the template and can be accessed at the global scope.
Adult Global (Full Article)
The Adult JavaScript global object is available from server world scripts and provides methods for working with angagements and overlays
Bot Global (Full Article)
The Bot JavaScript global object is available from server world scripts and provides methods and objects for creating, clothing, and working with NPC avatars
Cloud Global (Full Article)
The Cloud JavaScript global object is available from server world scripts and is the main entry point for the GameCloud functionality.
HAM Global (Full Article)
The HAM JavaScript global object is available from server world scripts and provides methods for working with avatar attachments
Market Global (Full Article)
The Cloud JavaScript global object is available from server world scripts and is the main entry point for the GameCloud functionality.
Rays Global (Full Article)
The Rays JavaScript global object is available from server world scripts and provides methods for working the Rays virtual currency
JavaScript Component Objects
Remarks [edit]
These are JavaScript wrappers for C# objects passed down from components
ActorExtended (Full Article)
Represents a an Actor in an Enagement.
AvatarActorExtended (Full Article)
Represents a an Actor in an Enagement that is based on a GameCloud AvatarExtended.
AvatarExtended (Full Article)
Represents an avatar which is a collection of DOM nodes starting with a root DOMController object and managed by the Creature Manager component
AvatarLayerExtended (Full Article)
Represents a modification layer on an avatar. These can be used to change clothing and attachment items and other properties.
CloudCurrencyExtended (Full Article)
Represents an available GameCloud virtual currency
ConfirmationHandleExtended (Full Article)
Represents a user confirmation or notification request in progress
CreatureActorExtended (Full Article)
Represents a an Actor in an Enagement that is based on a GameCloud CreatureAvatarExtended.
CreatureAvatarExtended (Full Article)
Represents an avatar ove a certain creature type
EngagementControlExtended (Full Article)
Represents an multiplayer engagement
EngagementExtended (Full Article)
Represents an Enagement which is a state machine that helps to coordinate complex scripted activities that may include multiple players or bot avatars
EngagementStateExtended (Full Article)
Represents a state in an Enagement which can be configured to allow transitions to other states via triggers
ListingInfoExtended (Full Article)
Provides information about an asset listed in a store
PersonaAvatarExtended (Full Article)
Represents an avatar based for a persona. It will wear the same clothes as the persona and reflect other changes to their avatar
PersonaLayerExtended (Full Article)
Represents a modification layer on an avatar that is shared by all avatars of a given persona. These can be used to change clothing and attachment items and other properties.
PlayerActorExtended (Full Article)
Represents a an Actor in an Enagement that is based on a GameCloud PlayerAvatarExtended.
PlayerAvatarExtended (Full Article)
provides access to the avatar for a participant in the room.
PlayerExtended (Full Article)
Represents a Player, which is the GameCloud's representation of a connected user, the quests progress, achievements, advancement, etc.
RuntimeLayerExtended (Full Article)
Represents a modification layer on an avatar that is specific to a single run-time avatar instance. These can be used to change clothing and attachment items and other properties.
JavaScript DOM Nodes
Remarks [edit]
As above, these are wrappers for C# objects that can be returned from function calls or passed to events. These are all wrappers for DOMObject derived classes implemented by DOMObjectExtended and it's derived classes.
DOMAnimationExtended (Full Article)
Represents a DOMAnimation in JavaScript
DOMControllerExtended (Full Article)
Represents a DOMController in JavaScript
DOMCurveExtended (Full Article)
Represents a DOMCurve in JavaScript. This DOM object represents an animation of the DOM. A Curve is made up of Keyframes with Values. A Player plays the curve and it's properties reflect the values at any given moment along the curve, and can project those values onto other objects in the DOM via it's Selector. You can create a new DOMCurve via the CreateCurve and CreateCurveFromJson methods of DOMObject.
DOMCurveKeyframeExtended (Full Article)
Represents a DOMCurveKeyframe in JavaScript
DOMCurvePlayerExtended (Full Article)
Represents a DOMCurvePlayer in JavaScript
DOMDocumentExtended (Full Article)
Represents a DOMDocument in JavaScript.
DOMGeometryExtended (Full Article)
Represents a DOMGeometry in JavaScript
DOMLightExtended (Full Article)
Represents a DOMLight in JavaScript.
DOMObjectExtended (Full Article)
Represents a DOMObject in JavaScript
DOMPhysicsApproachExtended (Full Article)
Represents a DOMPhysicsApproach in JavaScript
DOMPhysicsExtended (Full Article)
Represents a DOMPhysics in JavaScript
DOMPhysicsFaceExtended (Full Article)
Represents a DOMPhysicsFace in JavaScript
DOMPhysicsFacePointExtended (Full Article)
Represents a DOMPhysicsFacePoint in JavaScript
DOMPhysicsFaceTargetExtended (Full Article)
Represents a DOMPhysicsFaceTarget in JavaScript
DOMPhysicsFollowExtended (Full Article)
Represents a DOMPhysicsFollow in JavaScript
DOMPhysicsOperationExtended (Full Article)
Represents a DOMPhysicsOperation in JavaScript
DOMPhysicsPathingExtended (Full Article)
Represents a DOMPhysicsPathing in JavaScript
DOMPhysicsPathToExtended (Full Article)
Represents a DOMPhysicsPathTo in JavaScript
DOMPhysicsPursueExtended (Full Article)
Represents a DOMPhysicsPursue in JavaScript
DOMPhysicsSpawnAreaExtended (Full Article)
Represents a DOMPhysicsSpawnArea in JavaScript
DOMPhysicsSpawnAtExtended (Full Article)
Represents a DOMPhysicsSpawnAt in JavaScript
DOMPhysicsSpawnExtended (Full Article)
Represents a DOMPhysicsSpawn in JavaScript
DOMRenderableExtended (Full Article)
Represents a DOMRenderable in JavaScript
DOMSceneDocumentExtended (Full Article)
Represents a DOMSceneDocument in JavaScript.
DOMScriptExtended (Full Article)
Represents a DOMScript in JavaScript
DOMTransformExtended (Full Article)
Represents a DOMTransform in JavaScript
DOMVolumeExtended (Full Article)
Represents a DOMVolume in JavaScript