Remove a sound

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LoneElf

Active Member
Apr 30, 2017
165
2
18
24
Hey. So, on a server, I think mineplex it was, I was PvPing and I noticed that there was no damage sound but a different sound, almost like a block being placed, so I tried it out. When I tried, it plays the sound "CLICK", but the default damage sound is still there, if you know what that sounds like. Here is my code, and thanks for the help in adavanced! Code:
code_language.skript:
on damage of player:
        play "CLICK" to attacker at volume 0.2
 
I have no clue how to use packets. To be honest, I don't know what they are. Are they hard to use? Could someone give me an example of one or write out the code I need and explain? Thanks :emoji_slight_smile:
[doublepost=1502760272,1502758538][/doublepost]So I looked at the Tutorial that was posted on the Tutorial section of skUnity, but I did not understand any of it and still don't know how to use packets. If you know how, please help me as it would be really awesome and would be much appreciated. Thanks
[doublepost=1502765824][/doublepost]Just a question: Is this even possible to do?
 
I have no clue how to use packets. To be honest, I don't know what they are. Are they hard to use? Could someone give me an example of one or write out the code I need and explain? Thanks :emoji_slight_smile:
[doublepost=1502760272,1502758538][/doublepost]So I looked at the Tutorial that was posted on the Tutorial section of skUnity, but I did not understand any of it and still don't know how to use packets. If you know how, please help me as it would be really awesome and would be much appreciated. Thanks
[doublepost=1502765824][/doublepost]Just a question: Is this even possible to do?
Nice attempt at bumping. Anyways, yes this is possible. You'll have to do some research with packets.
 
Nice attempt at bumping. Anyways, yes this is possible. You'll have to do some research with packets.
Thanks man. Like I said, I looked up packets and still have no clue on how to do it. I don't understand the tutorials I read up on. If someone could help me, that would be great. Thanks.
 
The tutorial here is probably the best tutorial you'll find. you could also try downloading some other skripts to get some examples of it in use. It'd probably just be best to keep looking it over until you do understand it. Practice makes perfect after all^-^
 
Is there anyone who could give me an example of what I need? Thanks
[doublepost=1502817991,1502815312][/doublepost]So I looked more into it and found this:
code_language.skript:
Named Sound Effect
See also: #Sound Effect
Used to play a sound effect on the client. Custom sounds may be added by resource packs.

Packet ID    State    Bound To    Field Name    Field Type    Notes
0x19    Play    Client    Sound Name    String (256)    All sound effect names as of 1.12.1 can be seen here.
Sound Category    VarInt Enum    The category that this sound will be played from (current categories)
Effect Position X    Int    Effect X multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part)
Effect Position Y    Int    Effect Y multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part)
Effect Position Z    Int    Effect Z multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part)
Volume    Float    1 is 100%, can be more
Pitch    Float    Float between 0.5 and 2.0 by Notchian clients

From there, I looked at the link it gave me: http://pokechu22.github.io/Burger/1.12.1.html#stats:damagedealt

I found damageDealt and it is in the website that shows all of the sound effects. I'm not sure how to incorporate that in code, but I think I have started on a path. If someone could guide me, that would be great. Thank you.

Also, what is the packet named that I need? Would it be: PLAY_CLIENT_SOUND_DAMAGEDEALT ? I'm not sure. I might be WAY off, but I got it from: "Play Client Sound Name String (256)" that is shown in the code.
[doublepost=1502833392][/doublepost]So, I kept searching and found something like this: PLAY_CLIENTBOUND_number-here. Is each number a sound, like damageDealt? If not, what is each number and what is the damageDealt?
 
Is there anyone who could give me an example of what I need? Thanks
[doublepost=1502817991,1502815312][/doublepost]So I looked more into it and found this:
code_language.skript:
Named Sound Effect
See also: #Sound Effect
Used to play a sound effect on the client. Custom sounds may be added by resource packs.

Packet ID    State    Bound To    Field Name    Field Type    Notes
0x19    Play    Client    Sound Name    String (256)    All sound effect names as of 1.12.1 can be seen here.
Sound Category    VarInt Enum    The category that this sound will be played from (current categories)
Effect Position X    Int    Effect X multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part)
Effect Position Y    Int    Effect Y multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part)
Effect Position Z    Int    Effect Z multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part)
Volume    Float    1 is 100%, can be more
Pitch    Float    Float between 0.5 and 2.0 by Notchian clients

From there, I looked at the link it gave me: http://pokechu22.github.io/Burger/1.12.1.html#stats:damagedealt

I found damageDealt and it is in the website that shows all of the sound effects. I'm not sure how to incorporate that in code, but I think I have started on a path. If someone could guide me, that would be great. Thank you.

Also, what is the packet named that I need? Would it be: PLAY_CLIENT_SOUND_DAMAGEDEALT ? I'm not sure. I might be WAY off, but I got it from: "Play Client Sound Name String (256)" that is shown in the code.
[doublepost=1502833392][/doublepost]So, I kept searching and found something like this: PLAY_CLIENTBOUND_number-here. Is each number a sound, like damageDealt? If not, what is each number and what is the damageDealt?
Your close, you need the named sound packet (or maybe one of the other sound packets i can't remember). The sound sent within it is editable via string pinfo 0 within that packet
 
Thanks. So, what you are saying is that I need to find the packet name that is making the damage sound and edit it with string pinfo 0? So, this is what I don't understand: What is that packet name? Is it not: damageDealt? also, how would I edit it in more detail? string pinfo 0? What does that mean? Thanks for the reply :emoji_slight_smile:

EDIT: I just read the packets thread again, and is this what I would potentially do?
  1. code_language.skript:
    on packet event %damageDealt% #or whatever the packet name is:
        #set the sound to the sound I want via string pinfo 0 which I don't know how to use yet?
[doublepost=1503119424,1503014533][/doublepost]Bump
[doublepost=1503274338][/doublepost]bump
 
Status
Not open for further replies.