![]() |
|
|
#1 |
|
Making specific players hear specific sounds.
Here's the effect I'm going for. When a player touches a certain actor in a level, the player makes a sound that only he can hear. (I figure that the player actually needs to make the sound, because I don't want him to be able to move out of hearing range and miss the latter parts of the sound. I'm being cautious and saying that the sound can be as long as 5 seconds in duration.) Meanwhile, the touched object makes a different sound that everyone in hearing range except the touching player can hear.
Is there a way to prevent a sound played in the world from being heard by a specific player? I'm pretty sure that there's an easy way to do this, but I'm not at all versed in the ways of controlling sound with UScript. |
|
|
|
|
|
|
#2 |
|
Call ClientPlaySound() for any PlayerPawn that should hear it.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
|
|
#3 |
|
Thanks for the heads-up about the ClientPlaySound function. I tracked it all back to the PlaySound function in the base Actor class. However, after taking a look at it, I think I'm going to have to do a little math with this function. (i.e. to simulate distance from the actor by lowering volume) I was hoping I could just use the engine's native functions for determining sound audibility, and then find a way to block the instigator of the sound from hearing it.
|
|
|
|
|
|
|
#4 |
|
You can increase the sound volume by playing the sound in more than one sound_slot.
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|