Skript: playsound at region

Created on 26 Mar 2019  路  2Comments  路  Source: SkriptLang/Skript

Hey. I have a suggestion to add playsound at region and audible outside the region for players...
command /Mieszkaniezabij :
usage: true/false
permission: mieszkanie.zabij
trigger:
if arg 1 is "True":
set {domofon} to true
send "&6[&4&lDestruktor&6] &2Destrukcja mob贸w zosta艂a uruchomiona :)" to all players
wait 2 real seconds
play sound "minecraft.custom.la" at region this is my code and I would like to friends outside the region could hear the custom song...

Most helpful comment

This isn't something Skript should really implement. You have the tools to do so yourself already -- just loop through the players and play the sound at and to them specifically if they're in your desired region.

All 2 comments

You can already do this with the current effect. You cant play it at the "region" per se but you can play it at a specific location in the region and set the volume really high
Volume = distance from location (if I'm not mistaken a volume of 10 would allow players within a 10 block radius to hear this)

To play at a region wouldnt really make much sense, since a region is hundreds if not thousands of blocks. The BukkitAPI method for playing a sound is at once specific location. You would have to iterate thru all the blocks in a region, which would just overlap and cause issues.

So pick a specific spot, play the sound there at a high volume.

This isn't something Skript should really implement. You have the tools to do so yourself already -- just loop through the players and play the sound at and to them specifically if they're in your desired region.

Was this page helpful?
0 / 5 - 0 ratings