Skip to main content

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.

NameTypeContextDescription
bellVariablestringBell layerPoints to the name of the variable containing the bell settings
bellPopupstringBell layerThe name of a rectangle object on the object layer in the map that will display the "Ring" button to ring the bell.
bellButtonTextstringBell layerthe text to display in the button to ring the bell. Defaults to "Ring"
autoOpenbooleanDoorstep layerBy setting autoOpen to true, the door will automatically open when someone walks in the door step layer.
autoClosebooleanDoorstep layerBy setting autoClose to true, the door will automatically close when someone walks out of the door step layer.
openTriggerMessagestringDoorstep layerThe action message displayed to open the door
closeTriggerMessagestringDoorstep layerThe action message displayed to close the door
tagstringDoorstep layerLimits who can operate the door from this doorstep
codestringDoorstep layerA digital access code
bindVariablestringAction layerThe name of the variable that will be altered when one enters/leaves the layer
enterValuestringAction layer(optional) The value the variable will be set to when entering the layer
leaveValuestringAction layer(optional) The value the variable will be set to when leaving the layer
visiblestringAny layerThis 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.

NameTypeDescription
bellboolean (true)Adding this property marks the variable as representing a bell
bellSoundstringURL of the sound of the bell ringing
soundRadiusnumberThe radius (in pixels) of the sound of the bell or door opening/closing
doorboolean (true)Adding this property marks the variable as representing a door
openLayerstringOn a "door" variable, this MUST contain the name of the opened door layer (or several layers on multiple lines)
clodeLayerstringOn a "door" variable, this MUST contain the name of the closed door layer (or several layers on multiple lines)
openSoundstringURL of the sound of a door opening
closeSoundstringURL of the sound of a door closing