Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Stopping looping sound...finally

Author
Message
LostSoul54
16
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 9th Mar 2005 11:57 Edited at: 9th Mar 2005 12:00
I finally got a looping sound to play when it's suposed to, and stop when it's not. I had problems with my sound playing from the start of the level, and never stopping throughout the map. I have also seen several questions on the subject.

Here is what I ultimately came up with:

I used the code from the door1.fpi



and changed it like this:



Kind of a flimsy workaround, since the sound is still looping, just inaudible, but it works for me

Hope it helps someone with this problem, or leads me to a more effecient way of doing it

It's easy not to get lost when you have no idea where you are going
FernandoK
16
Years of Service
User Offline
Joined: 4th Feb 2003
Location:
Posted: 9th Mar 2005 12:29
Thanks. Maybe they'll introduce something like "stopsound". Untill then, this will do.
LostSoul54
16
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 9th Mar 2005 23:50
Update:

Well, it looks as though I may have spoken too soon. I got it to work on a small test level I threw together. But have not been able to re-create it in anything else I try it in. I must have messed up the script somewhere since I got it to work. The looping sound still plays through out the level. We really need a stopsound command.

Until then I will have to put the [soundscale=4] back in, or

[sarcasm]place an object right after my fire that displays a screen message like this:

Please press alt-tab now, asccess the *\audiobank folder, delete the med_fire.wav file, alt-tab back and continue, thank you[/sarcasm]

It's easy not to get lost when you have no idea where you are going
Cloud of Crows Studios
14
Years of Service
User Offline
Joined: 22nd Nov 2004
Location:
Posted: 10th Mar 2005 02:05 Edited at: 10th Mar 2005 06:03
Lostsoul - I'm not in front of FPSC right now, but wouldn't something like this work:



In theory this creates a "looped" sound effect by playing it over and over again, but only as long as the player is within 300 units of the associated entity. You have to change the timergreater value to the time length of the wav file you want to play (you should be able to get that info easily enough from windows media player)

Dunno if it will work or not - someone who can script better than I should be able to point out glaring errors in the above

Let us know if this works or it sparks some other solution for this problem. Thx.
LostSoul54
16
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 10th Mar 2005 03:31
Haven't thought of that approach

I will try it out tonight when I get home. Thank you very much for the advice

It's easy not to get lost when you have no idea where you are going
Cloud of Crows Studios
14
Years of Service
User Offline
Joined: 22nd Nov 2004
Location:
Posted: 10th Mar 2005 06:04
Welcome.

Let us know if it works or if there are weird things with it (like skipping or sound delays when a lot of entities are around, etc.)
LostSoul54
16
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 10th Mar 2005 11:28
I can't get the script to work. No sound plays at all. I tried it as the [init] and [main] script, tried different sound files, made sure the entity was dynamic...Nothing plays

I can't believe such a simple thing to do is so complicated

It's easy not to get lost when you have no idea where you are going

Login to post a reply

Server time is: 2019-09-20 07:41:08
Your offset time is: 2019-09-20 07:41:08