как работает команда playsound в майнкрафт пе

Как работает команда playsound в майнкрафт пе

Команда playsound и её возможности

Команда playsound, предназначена для вывода указанных звуков в игру, и может использована на серверах и прочих картах, думаю вам этот материал будет полезен, и вы используете его.

Давайте начнем с рассмотрения непосредственно команды /playsound. Она обладает достаточно простым синтаксисом:

Первым параметром является звук, название которого определяется исходя из его расположения относительно папки /.minecraft/ и, к примеру, может быть таким:

Расположенный в .minecraft\assets\sound\mob\pig\death.ogg звук может быть воспроизведен по имени mob.pig.death

Если к событию привязано несколько звуковых файлов (например разные вариации для звука шагов), то не следует учитывать номер звука, например:

Вторым параметром является игрок, которому будет проигрываться звук. Следует учитывать, что если указывается какой-то конкретный игрок а не маска типа @p, то игрок должен присутствовать на сервере и у него должна быть возможность услышать звук из его источника.

Повторюсь, что приведенные выше два параметра являются обязательными для корректной работы команды! Ну а теперь перейдем к необязательным параметрам в порядке их следования.

Координаты x, y, z задают точку из которой будет воспроизводиться звук. Если вместо точных координат задан знак «

» то это означает текущую локацию игрока или командного блока. Следует отметить, что можно задавать относительные координаты, например «

4″ будет означать «текущая координата плюс четыре». Таким образом просто указание знака

на самом деле является допустимым сокращением записи «

Следующим параметром является уровень громкости звука. Данный параметр задает дистанцию на которой можно слышать воспроизводимый звук. Стандартные значения данного параметра от 0.0 до 1.0 но могут быть и больше единицы. Отмечу, что при значениях больше 1.0 звук на самом деле не становится громче, но его радиус слышимости (16 блоков по умолчанию для 1.0) увеличивается пропорционально. Проще говоря, радиус слышимости звука будет «16*громкость».

Параметр высота звука задает одновременно и высоту и продолжительность воспроизводимого звука, что означает что звук не только искажается, но и меняется скорость его воспроизведения. Допустимые значения данного параметра от 0.0 до 2.0 включительно.

Последним параметром является минимальная громкость, и на деле этот параметр управляет громкостью звука за пределами его нормальной зоны слышимости. Следует отметить, что громкость звука внутри сферы слышимости на деле может быть меньше, чем громкость за пределами, если значение минимальной громкости больше значения громкости.

В качестве наглядного примера можно привести команду, проигрывающую звук включения портала из точки на 10 блоков выше расположения командного блока всем игрокам в стандартном радиусе распространения:

Источник

Minecraft Wiki

The Minecraft Wiki is no longer considered as official by Microsoft and therefore several changes are required to be made, including to the wiki’s logo. Please read this announcement for more information.

Commands/playsound

Plays a specified sound at a player, in a location, and in a specific volume and pitch.

Contents

Syntax [ ]

Arguments [ ]

Specifies the sound to play. In Bedrock Edition, it must be either a single word (no spaces) or a quoted string. Can be a sound event defined in sound_definitions.json (for example, mob.pig.say ). In Java Edition, must be a resource location. Can be a sound event defined in sounds.json (for example, entity.pig.ambient ). A sound event may be affiliated with multiple sounds, and the sound that is actually produced is chosen at random from them, modified by their «weight», just as the game normally would. For example, the entity.pig.ambient sound event plays one of several pig sounds at random, because the event has multiple sounds associated with it. Resource packs may add their own events to sounds.json; the command successfully plays these. File names are not used by this command; it strictly uses the events defined in sounds.json (which may not even be similar to the original file names and paths), and thus a resource pack adding new sound files must define events for them (this is not necessary when replacing old sounds already defined in events).

Читайте также:  чем можно покрасить блок двигателя

Specifies the sound’s target. Must be a player name, a target selector or a UUID. And the target selector must be of player type.

Specifies the position to play the sounds from. Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.

Specifies the distance that the sound can be heard. If not specified, defaults to 1. For values less than 1, the volume diminishes. For values greater than 1, the sound does not actually grow louder, but its audible range (a 16-block radius at 1) is multiplied by volume. There is always a gradual falloff to silence based on distance from the center of the sphere. For values equal to or less than 0, no player can hear the sound. Must be a Single-precision floating-point format number. In Java Edition, it must be greater than or equal to 0.0.

Specifies the pitch of the sound. If not specified, defaults to 1. Must be a Single-precision floating-point format number. In Java Edition, it must be between 0.0 and 2.0 (inclusive). In Java Edition, values less than 0.5 are equivalent to 0.5. Values lower than 1 lower the pitch and increase the duration; values greater than 1 raise the pitch and reduce the duration. The pitch value is a multiplier applied to the frequency, so if a value from 0.5 to 1 is doubled, the pitch goes an octave higher. (See Note block § Usage for converting other intervals to pitch values, but be aware that 1 isn’t F♯ for all sound effects.) In Bedrock Edition, only values between 0 and 256 work. Values above 256 are equivalent to the default value; values less than or equal to 0 makes the sound inaudible. [ more information needed ]

Specifies the volume for targets outside the sound’s normal audible sphere. If a target is outside the normal sphere, the sound is instead centered some short distance (two blocks away) from the target, and this argument determines its volume. If not greater than 0, targets outside the normal audible sphere cannot hear the sound. If not specified, defaults to 0.0. Must be a Single-precision floating-point format number. In Java Edition, it must be between 0.0 and 1.0 (inclusive).

Источник

Команды / звук

Воспроизводит указанный звук для игрока, в определенном месте, с определенной громкостью и шагом.

Синтаксис

Аргументы

JE : : resource_location
BE: звук: строка : basic_string

JE : : entity
BE: player: target : CommandSelector

Определяет цель звука. Должно быть имя игрока, целевой селектор или UUID. И целевой селектор должен быть типа игрока..

JE : : vec3
BE: position: xyz : CommandPositionFloat

Определяет позицию для воспроизведения звуков. Должны быть трехмерные координаты с плавающей количество элементов. Принимает нотации тильды и символа вставки.

JE : : float
BE : volume: float : float

Определяет расстояние, на котором звук может быть слышен. Если не указано, по умолчанию используется значение 1. Для значений меньше 1 громкость уменьшается, и звук имеет меньшую сферу, в которой он может быть слышен. Для значений больше 1 звук фактически не становится громче, но его слышимый диапазон (радиус 16 блоков при 1) умножается на громкость. Всегда есть постепенный переход к тишине в зависимости от расстояния от центра сферы. Для значений, равных или меньших 0, звук не слышен. Должен быть числом в формате с плавающей запятой одинарной точности. В Java Edition он должен быть больше или равен 0,0.

Читайте также:  skyrim мод история о дозорных стендарра

JE : : float
BE: pitch: float : float

JE : : float
BE: minimumVolume: float : float

Определяет громкость для целей за пределами нормальной слышимой сферы звука. Если цель находится за пределами нормальной сферы, звук вместо этого центрируется на небольшом расстоянии от цели (менее четырех блоков), и этот аргумент определяет его громкость. Должен быть одинарной точности число в формате с плавающей запятой. В Java Edition он должен находиться в диапазоне от 0,0 до 1,0 (включительно)..

Источник

How to Use the PlaySound Command in Minecraft

This Minecraft tutorial explains how to use the /playsound command with screenshots and step-by-step instructions.

You can play a sound effect any time you want using the /playsound command in Minecraft (see also /stopsound command). Let’s explore how to use this cheat (game command).

Supported Platforms

The /playsound command is available in the following versions of Minecraft:

Platform Supported (Version*)
Java Edition (PC/Mac) Yes (1.6.1)
Pocket Edition (PE) Yes (1.0.5)
Xbox 360 No
Xbox One Yes (1.2)
PS3 No
PS4 Yes (1.14.0)
Wii U No
Nintendo Switch Yes (1.5.0)
Windows 10 Edition Yes (1.0.5)
Education Edition Yes (1.0.18)

* The version that it was added or removed, if applicable.
NOTE: Pocket Edition (PE), Xbox One, PS4, Nintendo Switch, and Windows 10 Edition are now called Bedrock Edition. We will continue to show them individually for version history.

Requirements

To run game commands in Minecraft, you have to turn cheats on in your world.

PlaySound Command

PlaySound Command in Minecraft Java Edition (PC/Mac)

In Minecraft Java Edition (PC/Mac), the syntax to start playing a sound effect is:

Definitions

PlaySound Command in Minecraft Pocket Edition (PE)

In Minecraft Pocket Edition (PE), the syntax to start playing a sound effect is:

Definitions

PlaySound Command in Minecraft Xbox One Edition

In Minecraft Xbox One Edition, the syntax to start playing a sound effect is:

Definitions

PlaySound Command in Minecraft PS4 Edition

In Minecraft PS4 Edition, the syntax to start playing a sound effect is:

Definitions

PlaySound Command in Minecraft Nintendo Switch Edition

In Minecraft Nintendo Switch Edition, the syntax to start playing a sound effect is:

Definitions

PlaySound Command in Minecraft Windows 10 Edition

In Minecraft Windows 10 Edition, the syntax to start playing a sound effect is:

Definitions

PlaySound Command in Minecraft Education Edition

In Minecraft Education Edition, the syntax to start playing a sound effect is:

Definitions

Examples

Example in Java Edition (PC/Mac)

To play the Creative music for the nearest player (even in Survival mode) in Minecraft Java Edition (PC/Mac):

To play the ambient sounds of a wither boss for the player named DigMinecraft:

To play the ambient sounds of an elder guardian for all players:

Example in Pocket Edition (PE)

To play the sound of thunder for the nearest player in Minecraft PE:

To play the curse sounds of an elder guardian for the player named DigMinecraft:

To play the sound of an explosion for all players:

Example in Xbox One Edition

To play the sound of a dolphin splashing for the nearest player in Minecraft Xbox One Edition:

To play the curse sounds of a zombie being converted into a drowned for the player named DigMinecraft:

To play the sound of a bucket filling with fish for all players:

Example in PS4 Edition

To play the sound of rain for the nearest player in Minecraft PS4:

To play the curse sounds of a turtle egg breaking for the player named DigMinecraft:

Читайте также:  как проверить драйвер звука на windows 10

To play the sound of an ender chest opening for all players:

Example in Nintendo Switch Edition

To play the sound of the enderdragon growling for the nearest player in Minecraft Nintendo Switch Edition:

To play the curse sounds of a camera taking a picture for the player named DigMinecraft:

To play the sound of a big fall for a random player:

Example in Windows 10 Edition

To play the shooting sounds of a blaze for the nearest player in Minecraft Windows 10 Edition:

To play a sound of levelling up for the player named DigMinecraft:

To play the sound of a fuse for all players:

Example in Ecuation Edition

To play the growling sounds of an enderdragon for the nearest player in Minecraft Education Edition:

To play a fizz sound for the player named DigMinecraft:

To play the sound of thunder for all players:

How to Enter the Command

1. Open the Chat Window

The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:

2. Type the Command

In this example, we are going to play the eerie, ambient sound of an elder guardian for the player named DigMinecraft with the following command:

Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.

Once the cheat has been entered, the sound effect will start playing for the player.

You will see the message » Played sound ‘minecraft:entity.elder_guardian.ambient’ to DigMinecraft » appear in the lower left corner of the game window to indicate that the sound effect has been played.

Congratulations, you have learned how to use the /playsound command in Minecraft.

Other Sound Commands

You can use other sound commands in Minecraft such as:

Источник

Команды / звук

Воспроизводит указанный звук для игрока, в определенном месте, с определенной громкостью и шагом.

Синтаксис

Аргументы

JE : : resource_location
BE: звук: строка : basic_string

JE : : entity
BE: player: target : CommandSelector

Определяет цель звука. Должно быть имя игрока, целевой селектор или UUID. И целевой селектор должен быть типа игрока..

JE : : vec3
BE: position: xyz : CommandPositionFloat

Определяет позицию для воспроизведения звуков. Должны быть трехмерные координаты с плавающей количество элементов. Принимает нотации тильды и символа вставки.

JE : : float
BE : volume: float : float

Определяет расстояние, на котором звук может быть слышен. Если не указано, по умолчанию используется значение 1. Для значений меньше 1 громкость уменьшается, и звук имеет меньшую сферу, в которой он может быть слышен. Для значений больше 1 звук фактически не становится громче, но его слышимый диапазон (радиус 16 блоков при 1) умножается на громкость. Всегда есть постепенный переход к тишине в зависимости от расстояния от центра сферы. Для значений, равных или меньших 0, звук не слышен. Должен быть числом в формате с плавающей запятой одинарной точности. В Java Edition он должен быть больше или равен 0,0.

JE : : float
BE: pitch: float : float

JE : : float
BE: minimumVolume: float : float

Определяет громкость для целей за пределами нормальной слышимой сферы звука. Если цель находится за пределами нормальной сферы, звук вместо этого центрируется на небольшом расстоянии от цели (менее четырех блоков), и этот аргумент определяет его громкость. Должен быть одинарной точности число в формате с плавающей запятой. В Java Edition он должен находиться в диапазоне от 0,0 до 1,0 (включительно)..

Источник

Компьютерный онлайн портал