partey_workadventure/docs/maps/special-zones.md

38 lines
1.8 KiB
Markdown
Raw Normal View History

{.section-title.accent.text-primary}
# Other special zones
## Making a "silent" zone
[Building your map - Special zones](https://www.youtube.com/watch?v=z7XLo06o-ow)
On your map, you can define special silent zones where nobody is allowed to talk. In these zones, users will not speak to each others, even if they are next to each others.
In order to create a silent zone:
2022-04-12 15:02:01 +02:00
* You must create a specific object.
* Object must be of type "`area`"
* In object properties, you MUST add a boolean "`silent`" property. If the silent property is checked, the users are entering the silent zone when they walk on the area.
2022-04-12 15:43:32 +02:00
{.alert.alert-info}
As an alternative, you may also put the `silent` property on a layer (rather than putting them on an "area" object)
2022-04-12 15:51:23 +02:00
but we advise to stick with "area" objects for better performance!
2022-04-12 15:43:32 +02:00
## Playing sounds or background music
Your map can define special zones where a sound or background music will automatically be played.
In order to create a zone that triggers sounds/music:
2022-04-12 15:02:01 +02:00
* You must create a specific object.
* Object must be of type "`area`"
* In object properties, you MUST add a "`playAudio`" property. The value of the property is a URL to an MP3 file that will be played. The URL can be relative to the URL of the map.
* You may use the boolean property "`audioLoop`" to make the sound loop (thanks captain obvious).
* If the "`audioVolume`" property is set, the audio player uses either the value of the property or the last volume set by the user - whichever is smaller. This property is a float from 0 to 1.0
{.alert.alert-info}
"`playAudioLoop`" is deprecated and should not be used anymore.
2022-04-12 15:43:32 +02:00
{.alert.alert-info}
As an alternative, you may also put the `playAudio` properties on a layer (rather than putting them on an "area" object)
2022-04-12 15:51:23 +02:00
but we advise to stick with "area" objects for better performance!