Blockland Forums > Modification Help
How do I play a sound to a client when their player gets hit by a projectile?
(1/3) > >>
TableSalt:
Question is in the title. Nothing else to say.
Conan:
%client.play2D(SoundDatablock); or %client.play3D(SoundDatablock, %position);

both of these has only the target client hear it; the 3D version makes it so they hear it as if it was coming from %position.
Dannu:

--- Quote from: Conan on September 15, 2017, 04:22:39 PM ---%client.play2D(SoundDatablock); or %client.play3D(SoundDatablock, %position);

both of these has only the target client hear it; the 3D version makes it so they hear it as if it was coming from %position.

--- End quote ---
Should use %client.playSound(%soundData) instead. It's the same thing except the default method with validity checks. (For 2D)
Dannu:
Also, do you mean if it gets hit by a specific projectile or any projectile?
TableSalt:

--- Quote from: Dannu on September 15, 2017, 05:22:19 PM ---Also, do you mean if it gets hit by a specific projectile or any projectile?

--- End quote ---
gets hit by a specific projectile
Navigation
Message Index
Next page

Go to full version