1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Play sound to all players

Discussion in 'Skript' started by verycoolguy123, Aug 6, 2017.

Thread Status:
Not open for further replies.
  1. verycoolguy123

    verycoolguy123 Active Member

    Joined:
    Jul 31, 2017
    Messages:
    70
    Likes Received:
    2
    How do I play the thunder sound to all players? thanks
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    i think it's skquery or maybe skellet that has a play sound effect to all players. I'm not sure if the vanilla skript play sound effect can play to all players.

    Just go to the docs and search 'sound' and find a syntax that supports multiple players
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Always do a quick google or search the docs
    I think this is what you need though:
    Play Raw Sound
    Addon: SkQuery
    Patterns:
    play raw sound %text% at %locations% with pitch %number% volume %number%
    Imitates the functionality of the /playsound command, without the ability to specify target players.
    Example:
    Code (Skript):
    1. on sneak toggle:
    2.    play raw sound "mob.bat.death" at player with pitch 1 volume 10
    - From docs ^
    - My version I think will work V
    Code (Skript):
    1. on sneak toggle:
    2.    play raw sound "mob.bat.death" to all players with pitch 1 volume 10
     
    • Agree Agree x 2
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Or you could do this:
    Code (Skript):
    1. on sneak toggle:
    2.     play "BAT_DEATH" to all players at volume 10
    Either way works,
     
    • Like Like x 2
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I understand, but I need the thunder sound. I can not find it anywhere for skript.
     
  6. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    This literally took me less than 30 seconds, please use google to your advantage! Never the less, no hard feelings, cheers, just replace the batsound from the code above with one of these.
    I think this is what you are looking for though,
    ambient (Natural sounds)
    - ambient.cave.cave[1-13]
    - ambient.weather.thunder[1-13]

    - ambient.weather.rain[1-8]
    - entity.lightning.impact
    - entity.lightning.thunder[1-3]
     
    • Agree Agree x 1
  7. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    • Useful Useful x 1
  8. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I've tried those, none of them work. I've researched this before posting in the thread.
     
  9. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    There is helpful documentation on the forums tab. Try looking at it when you are stuck. It has served me a lot

    Code (Skript):
    1. play raw sound "entity.lightning.impact" at player with pitch 1 volume 10    
     
    • Like Like x 1
  10. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I apologize, I misstook your post, anyways, these should work then
    , similar to the link Wynnevir posted.\
    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
    --- Double Post Merged, Aug 6, 2017, Original Post Date: Aug 6, 2017 ---
    ENTITY_LIGHTNING_THUNDER
    public static final Sound ENTITY_LIGHTNING_THUNDER
     
  11. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    there's only so many play sound effects. If you pick one, we can troubleshoot from there, but the skrayfall ones I at least can confirm working since I use them on my server. Any relevant info as to errors, version etc are helpful to try and fix it. "it doesn't work" doesn't give us much to go onx3
     
  12. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    There's no loop that matches 'loop-player with volume 10'
    When I use it correctly, it says that it doesn't understand the condition/effect.
     
  13. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    1: make sure you have to right addon and it's up to date.(skript as well. I use Bensku's fork dev 29)
    2:make sure you've restarted your server
    3: post the code containing your sound section as well.
     
  14. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    use loop-player
     
  15. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
  16. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    If you are using loop-player, use loop-player instead of player
    else, if you are not looping a player, use player.
     
  17. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    I am
    Thanks for pointing out the obvious xd
    I'm not
    --- Double Post Merged, Aug 6, 2017, Original Post Date: Aug 6, 2017 ---
    1: Not using bensku's fork and I'm using the latest version of skRayFall
    2: I have
    3:
    Code (Skript):
    1. command /acautoban [<offlineplayer>] [<text>]:
    2.     executable by: console
    3.     trigger:
    4.         if chance of 35%:
    5.             wait 6 seconds
    6.             loop all players:
    7.                 play raw sound "entity.lightning.impact" at loop-player with volume 10  
    8.                 broadcast "&7&m----------------------------------------------------------------"
    9.                 broadcast ""
    10.                 broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
    11.                 broadcast ""
    12.                 broadcast "&7&m----------------------------------------------------------------"
    13.                 execute command "/ipban -s %arg-1% %arg text%"
    14.                 stop
    15.         if chance of 45%:
    16.             wait 8 seconds
    17.             loop all players:
    18.                 play raw sound "entity.lightning.impact" at loop-player with volume 10  
    19.                 broadcast "&7&m----------------------------------------------------------------"
    20.                 broadcast ""
    21.                 broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
    22.                 broadcast ""
    23.                 broadcast "&7&m----------------------------------------------------------------"
    24.                 execute command "/ipban -s %arg-1% %arg text%"
    25.                 stop
    26.         if chance of 25%:
    27.             wait 10 seconds
    28.             loop all players:
    29.                 play raw sound "entity.lightning.impact" at loop-player with volume 10  
    30.                 broadcast "&7&m----------------------------------------------------------------"
    31.                 broadcast ""
    32.                 broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
    33.                 broadcast ""
    34.                 broadcast "&7&m----------------------------------------------------------------"
    35.                 execute command "/ipban -s %arg-1% %arg text%"
    36.                 stop
    37.         if chance of 15%:
    38.             wait 12 seconds
    39.             loop all players:
    40.                 play raw sound "entity.lightning.impact" at loop-player with volume 10  
    41.                 broadcast "&7&m----------------------------------------------------------------"
    42.                 broadcast ""
    43.                 broadcast "&c%arg-1% &7was detected cheating and was removed from the network"
    44.                 broadcast ""
    45.                 broadcast "&7&m----------------------------------------------------------------"
    46.                 execute command "/ipban -s %arg-1% %arg text%"
    47.                 stop
     
  18. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    You're not using skrayfall sounds or format.
    Sounds: https://hub.spigotmc.org/javadocs/spigot/
    Reference for format:
    [​IMG]
     
  19. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    This is what I used at first. Nevertheless, I get the same error.

    EDIT: I also use skQuery, so it should also work
    --- Double Post Merged, Aug 7, 2017, Original Post Date: Aug 6, 2017 ---
    Bump
     
Thread Status:
Not open for further replies.

Share This Page

Loading...