News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 7th Mar 2002, 11:04 AM   #1
Techno JF
He Who Has Powerful Words
 
Techno JF's Avatar
 
Join Date: Apr. 8th, 2001
Location: a few steps away from Oneiros.
Posts: 961
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.
Techno JF is offline   Reply With Quote
Old 7th Mar 2002, 11:32 AM   #2
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,785
Call ClientPlaySound() for any PlayerPawn that should hear it.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak/JDN | 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!"
Wormbo is offline   Reply With Quote
Old 7th Mar 2002, 01:09 PM   #3
Techno JF
He Who Has Powerful Words
 
Techno JF's Avatar
 
Join Date: Apr. 8th, 2001
Location: a few steps away from Oneiros.
Posts: 961
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.
Techno JF is offline   Reply With Quote
Old 7th Mar 2002, 01:16 PM   #4
TaoPaiPai
Commisaire Van Loc
 
TaoPaiPai's Avatar
 
Join Date: Jun. 13th, 2000
Location: Matnik
Posts: 1,623
You can increase the sound volume by playing the sound in more than one sound_slot.
TaoPaiPai is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:38 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer