How to : Sounds looped then stopped, under switch control but...

Started by David B., 17 August 2013, 18:17:28

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

David B.

Hi, I would need some idea to realize a little trick.

What I want is a looped ambiant sound, which starts playing by a one-time touchplate when entering a room.
After that, a switch should allow the player to stop the sound... And also, it must work only one time. The switch shouldn't trigger the sound a second time after that, having only the mission to stop it.

Uuuuhhh ? Ok, I'm giving some explanation about the application : you're going into a corridor, and there a phone starts ringing. After that, you approach the phone (provided you have the reflex to do so in the game) and push the use key, so to "pick up the phone" with an invisible switch ; This must stops the ring (and beside, also play a pick up sound and a following weird communication sound effect but that's another part...)

For the moment, I used a touchplate linked to an activator & external sector SE20, which play the sound when activated - but one single time! - instead of being looped. If there was a way so that the phone never stop ringing, excepted when "you pick up the phone", when a switch stops it... Any idea or other way to do ?
David B.

High Treason

This one had me stumped - I was making an alarm, the one that goes off in Quantum Physics - you need to make two vators.

Make two ST20's and put an activator in them that is tagged the same. Place an SE10 in each, the delay you'll have to tweak to the length of the sound or whatever - because you put MUSICANDSFX in there too. Make sure both ST20's are in the closed position.

Add a new activator to ONLY ONE of the ST20's, tag it differently to the other activators and link it to your touchplate, you can also link the switch to that one but you might have to add yet another activator for that.

What will happen is that both are closed and stay closed, but the Touchplate will open one, which will attempt to close on it's own making the other open (causing a loop) and the switch will reset them to how they started.
[glow=black,2,300]sprite[].sectnum -1[/glow]

David B.

Well, many problems remain. I also tried various solutions. Some remarks about that :

- If ST20's cannot open, then SE10 autoclose with delay >0 will not work, thus they don't activate the other ST20's. So I don't know if that's you mean.
- When the switch reset a ST20's, this is gonna be playing the sound one time again !

Beside : I succeed to loop properly the sound with two ST20's, but allowing them to open with opened adjacent sectors, so that SE10 works. But it's not going further, cause the switch never stop the sound suddenly and definitely.

Finally, I would simplify the trick by using a customized looped sound. Thus I just need to trigger it, then to be able to stop it suddenly and definitely. If the player doesn't pick up the phone, the sound will finally end like in reality... so that idea is also exploitable.

For example, I think about a ST20's which play the sound when it's raised (at low speed), but it must stop playing and remains muted when lowered but I didn't succeed.
David B.

High Treason

I meant to say to hook a masterswitch up to the switch... You can use delays with those so you can make whatever the phone does after answering wait a while so the ringing is silenced.

I've attached an example map, it's just a corridor, a phone and a loud ringing sound.

[attachment deleted by admin]
[glow=black,2,300]sprite[].sectnum -1[/glow]

David B.

Many thanks for the map. I'll check this soon.

BTW, I just have created a sound but this is played very slowly in the game, at very low frequency. The parameters inside the game weren't different from other sound number I'm using for the same purpose. And I have replaced it by another testing sound to see what happen, it was perfectly played in the game this time. So, IMO it's coming from the sound file.

Why is that ? I'm always using stereo 16bits .voc sounds and it worked everytime.

Are there some parameters with customized sounds I must follow ??

David B.

Puritan

I think sounds should be recorded in mono  :)


Open up User.con and you will see the necessary specs for sounds.
Bitter words mean little to me. Autumn winds will blow right through me
And someday in the mist of time, when they asked me if I knew you
I'd smile and say you were a friend of mine, and the sadness would be lifted from my eyes
Oh when I'm old and wise

David B.

I already used stereo sounds successfully. And I already tried to set that sound in mono, with no result.
I have also changed the soundname in order to match another soundnumber where the parameters are 0,0,0,0,0 - so to be sure there wouldn't be any pitch on it.
It doesn't work, my sound - and especially this record only ! - mess around in the game.

The specs given in the user.con are simples, I did nothing wrong regarding those rules.

I need to use that sound, and above all I must know the reason why this occurs to deal with it for anytime this will come again.
David B.

quakis

Not sure if this will even help, just throwing this out there; Since you're using .voc, have you tried testing to see if the same problem occurs when using different formats like .wav or .ogg? I'm thinking along the lines that different formats might produce different results here, but I have doubts.

David B.

Ok, this is fixed.
If interested to know, this comes from the sampling frequency, which must be forced to 44100Hz because this is the playback default speed of the game which doesn't recognize the frequency like a media player would do everytime. Or maybe this feature is linked to the .voc format. Mmmmm... getting old all this.

I received the same reaction at the other forum about to get rid of those old fashioned way to work, and use .wav or .ogg files...   ::)
David B.