For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

working TriggeredAmbientSound needed

Ask UnrealEd 1 mapping related questions, or give hints, tips and tricks
Post Reply
User avatar
)Leela(-[otS]-
OldUnreal Member
Posts: 205
Joined: Tue May 31, 2011 7:30 pm

working TriggeredAmbientSound needed

Post by )Leela(-[otS]- »

Hi there :)

I'm looking for a way to get a working TriggeredAmbientSound.
I've never seen a working version from 225 to 227j_42.

I made a modified TriggerLight actor for it and it works so far, but the soundvolume is too low and I always need several actors for one sound.
Is there really no way to get this actor to work?

For example, it should be able to turn an alarmsound on and off when triggered.
User avatar
Krull0r
Global Moderator
Posts: 543
Joined: Sun Jul 01, 2007 4:07 pm

Re: working TriggeredAmbientSound needed

Post by Krull0r »

If you use a TriggerLight the sound volume depends on the Light brightness.


So make sure you set your TriggerLight brightness to 255 and the Lightradius to 0 to have no impact in the levels lighting.

If you use a triggerable ambientsound it wouldn't be louder then a triggerlight with LightBrightness 255.
Image
User avatar
)Leela(-[otS]-
OldUnreal Member
Posts: 205
Joined: Tue May 31, 2011 7:30 pm

Re: working TriggeredAmbientSound needed

Post by )Leela(-[otS]- »

Hi :)

yup, those are already the default values of my faked TriggeredAmbientSound  ;)
But I need two of them to get the same volume as I get when using one SpecialEvent for the same sound.

I really can't say how it would work with the TriggeredAmbientSound, because I never got a single sound out of it.
But if one SpecialEvent is nearly double as loud as one of my custom actor I wondered if there is a way to get a better working one.
Last edited by )Leela(-[otS]- on Fri Jun 21, 2019 6:05 pm, edited 1 time in total.
User avatar
Masterkent
OldUnreal Member
Posts: 1469
Joined: Fri Apr 05, 2013 12:41 pm

Re: working TriggeredAmbientSound needed

Post by Masterkent »

I made a modified TriggerLight actor for it and it works so far, but the soundvolume is too low and I always need several actors for one sound.
Is there really no way to get this actor to work?
That's hard to tell if you keep the source code of your amb sound class in secret.
For example, it should be able to turn an alarmsound on and off when triggered.
You can try this code: (written out of hand, untested, there may be errors).
User avatar
)Leela(-[otS]-
OldUnreal Member
Posts: 205
Joined: Tue May 31, 2011 7:30 pm

Re: working TriggeredAmbientSound needed

Post by )Leela(-[otS]- »

Hello :)

there is no secret source code :D

I simply made a subclass of TriggerLight and changed some default settings:

Code: Select all

KKTrAmbSnd

bAlwaysRelevant = True
bGameRelevant = True
bHidden = True
bMovable = True
bNoDelete = False

LightBrightness = 255
LightSaturation = 0

LightCone = 0
LightPeriod = 0
LightRadius = 0
VolumeBrightness = 0
that's all and it works.
Not sure about bGameRelevant and bHidden, but that shouldn't have an impact on SoundVolume anyway. The only other change is a custom icon for the editor.

But I still don't understand why the original TriggeredAmbientSound never and still doesn't work.
User avatar
)Leela(-[otS]-
OldUnreal Member
Posts: 205
Joined: Tue May 31, 2011 7:30 pm

Re: working TriggeredAmbientSound needed

Post by )Leela(-[otS]- »

Hello :)

I tested the code and the actor works nearly perfect. The SoundVolume is normal now and usually one actor should be enough.
If really a louder sound is needed you can use two or more of them, but they all have to be at the exact same position or they will go out of sync if the player moves a bit away from them and comes back.
To make them also work online bAlwaysRelevant must be set to True.

I was looking for about ten years now for a working TriggeredAmbientSound. Five years ago I made the TriggerLight actor because it was an emergency and I needed the actor very urgently. Back then I remembered the trick with the TriggerLight.

I had already lost the hope that I would ever see a real working TriggeredAmbientSound. But this one works like a charm.

Thank you very very much Masterkent [smiley=thumbsup.gif]
User avatar
Masterkent
OldUnreal Member
Posts: 1469
Joined: Fri Apr 05, 2013 12:41 pm

Re: working TriggeredAmbientSound needed

Post by Masterkent »

I simply made a subclass of TriggerLight and changed some default settings:
Hah, I didn't know that Light actors can control their ambient sounds based on lighting-related properties. Now I see that they allow something even more interesting than scaling by LightBrightness: https://lodev.org/unrealed/lighting/lighting.html#sound
But I still don't understand why the original TriggeredAmbientSound never and still doesn't work.
It uses PlaySound to imitate ambient sound and it uses AmbSound instead of AmbientSound as the sound object. Besides, it needs a positive rePlayTime. The sound can't be stopped immediately once it's "turned off". And if it's looped, then "turning off" will have an effect only after you leave the audible radius. Probably, this class was written for a very specific usage...
I tested the code and the actor works nearly perfect. The SoundVolume is normal now and usually one actor should be enough.
Does it really differ from TriggerLight's? Make sure you're using the same SoundRadius when comparing.
To make them also work online bAlwaysRelevant must be set to True.
That's weird, an actor with ambient sound should always be net-relevant within the audible radius (without enabling bAlwaysRelevant).
Last edited by Masterkent on Sat Jun 22, 2019 7:59 am, edited 1 time in total.
User avatar
.:..:
OldUnreal Member
Posts: 1634
Joined: Tue Aug 16, 2005 4:35 am

Re: working TriggeredAmbientSound needed

Post by .:..: »

To make them also work online bAlwaysRelevant must be set to True.
That's weird, an actor with ambient sound should always be net-relevant within the audible radius (without enabling bAlwaysRelevant).
It will stop networking once there is no ambient sound, thus if a client is out of hearing range when it stops the sound, they will never receive the information of no sound.
1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD :P
(ಠ_ಠ)
User avatar
Masterkent
OldUnreal Member
Posts: 1469
Joined: Fri Apr 05, 2013 12:41 pm

Re: working TriggeredAmbientSound needed

Post by Masterkent »

To make them also work online bAlwaysRelevant must be set to True.
That's weird, an actor with ambient sound should always be net-relevant within the audible radius (without enabling bAlwaysRelevant).
It will stop networking once there is no ambient sound, thus if a client is out of hearing range when it stops the sound, they will never receive the information of no sound.
Maybe I shouldn't have defined default.bNoDelete then. On the other hand, respawning an actor each time it becomes net-relevant has some drawbacks too, so I'm not sure which combination would be better:

Code: Select all

bAlwaysRelevant=True
bNoDelete=True
or

Code: Select all

bAlwaysRelevant=False
bNoDelete=False
Last edited by Masterkent on Sat Jun 22, 2019 10:10 am, edited 1 time in total.
User avatar
)Leela(-[otS]-
OldUnreal Member
Posts: 205
Joined: Tue May 31, 2011 7:30 pm

Re: working TriggeredAmbientSound needed

Post by )Leela(-[otS]- »

Hello :)

in the past, when the server still was 225 we had a problem with DistanceLightning actors in skyboxes and also TriggerLights.
The skyboxes had an eyes killing flicker for Clients. TriggerLights, which should be off at mapstart were on when seen from far away, or better when a player still wasn't in the lightradius of those actors.

I digged a bit around to find the cause and a solution for these problems. The reason was the replication. It was not updated before a player reached the lightradius. In case of the skyboxes and DistanceLightning this was impossible.
I then changed bAlwaysRelevant to True for both actors with AutoRunCommands and that worked. The fast flashing on skies were gone and TriggerLights which should be off at mapstart were off.

When I tested the TriggeredAmbSound actor on a server this morning the sound was already on when I entered the map. I still wasn't in the "real" soundradius, but I could hear it right at start. So I set bAlwaysRelevant True on it and tested it again and it worked like it should.
Last edited by )Leela(-[otS]- on Sat Jun 22, 2019 11:24 am, edited 1 time in total.
User avatar
medor
OldUnreal Member
Posts: 343
Joined: Sun May 17, 2009 7:19 am

Re: working TriggeredAmbientSound needed

Post by medor »

May this UT can help you

http://medor.no-ip.org/index.php?dir=UEditor_Developing/&file=TestPlaySoundForInstigatorOnly.unr.7z
http://medor.no-ip.org/index.php?dir=UEditor_Developing/&file=WiredMoverSound2.zip
http://medor.no-ip.org/index.php?dir=UEditor_Developing/&file=Sektor_sound.zip

make search here for more http://medor.no-ip.org/index.php?dir=UEditor_Developing
UTfiles http://medor.no-ip.org/
Image
Image
Image
Image
Post Reply

Return to “UnrealEd, the editor for Unreal up to version  226”