Properties Reference
info
To use the properties in this document, you need to import the "Scripting API Extra" script in your map
This document does not list the properties available out-of-the-box in WorkAdventure but only the properties added by the "Scripting API Extra" package.
Layer Properties
Those properties can be set on layers.
Name | Type | Context | Description |
---|---|---|---|
bellVariable | string | Bell layer | Points to the name of the variable containing the bell settings |
bellPopup | string | Bell layer | The name of a rectangle object on the object layer in the map that will display the "Ring" button to ring the bell. |
bellButtonText | string | Bell layer | the text to display in the button to ring the bell. Defaults to "Ring" |
autoOpen | boolean | Doorstep layer | By setting autoOpen to true, the door will automatically open when someone walks in the door step layer. |
autoClose | boolean | Doorstep layer | By setting autoClose to true, the door will automatically close when someone walks out of the door step layer. |
openTriggerMessage | string | Doorstep layer | The action message displayed to open the door |
closeTriggerMessage | string | Doorstep layer | The action message displayed to close the door |
tag | string | Doorstep layer | Limits who can operate the door from this doorstep |
code | string | Doorstep layer | A digital access code |
bindVariable | string | Action layer | The name of the variable that will be altered when one enters/leaves the layer |
enterValue | string | Action layer | (optional) The value the variable will be set to when entering the layer |
leaveValue | string | Action layer | (optional) The value the variable will be set to when leaving the layer |
visible | string | Any layer | This property can control the visibility of a layer. Any "truthy" value will display the layer. An empty value will hide it. |
Variables properties
Those properties can be set on variables.
Name | Type | Description |
---|---|---|
bell | boolean (true ) | Adding this property marks the variable as representing a bell |
bellSound | string | URL of the sound of the bell ringing |
soundRadius | number | The radius (in pixels) of the sound of the bell or door opening/closing |
door | boolean (true ) | Adding this property marks the variable as representing a door |
openLayer | string | On a "door" variable, this MUST contain the name of the opened door layer (or several layers on multiple lines) |
clodeLayer | string | On a "door" variable, this MUST contain the name of the closed door layer (or several layers on multiple lines) |
openSound | string | URL of the sound of a door opening |
closeSound | string | URL of the sound of a door closing |