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 / Sound Script

Author
Message
the ultimate gamer
18
Years of Service
User Offline
Joined: 30th Jul 2006
Location:
Posted: 10th Apr 2007 00:18
Does anyone have a script that destroys a sound zone and/or trigger zone?

I am asking this because I want to have a sound play and when you enter a certian area it goes away and a new sound is played. I know this can be done but i cant figure out how to make the previous sound go away and not play if you enter the area again.

I have tried trigger zones, but I can't figure out how to get the sound to play everywhere.

If anyone has a script which does this, I would greatly appriciate it if you would let me use it.

***BTW*** have searched and am horrible at scripting

hi
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 10th Apr 2007 22:33
If you only want a sound to play once when the player enters a sound zone and never be played again, edit the sound zone properties and use 'soundinzone.fpi' in main field.

If you want a sound to play continuously witin a specified area and to always be played in this area, enlarge the sound zone by holding shift and left mouse button to drag zone out and use 'soundloopinzone.fpi' in main field. The sound will stop playing as soon as you leave the zone area.

You could set up multiple sound zones to play different sounds / music in different areas.

If you want to have a sound activated which will play continuoulsy throughout the level use 'repeatsound.fpi' in the main field or set the music field in the global settings when building your game.

I always delete the 'repeatsound.fpi' from decals e.g. fire etc and use sound zones to control noise as it stops the sound being heard all over the level / through walls etc and would only use this script for music of some description.

To create a continuous sound that can be destroyed and replaced with a new one, I think you need to call an entity which will be activated somewhere outside of the map using the 'If Used' field. Then assign the 'repeatsound.fpi' script to it and reference the required sound file in the entities properties. You can either use the 'spawn life' value to determine how long this entity will exist for or I would imagine you would need to use a seperate script to destroy this entity at the point you wish it to stop playing. If the sound doesn't stop playing once the entity is destroyed you might need to include 'sound=audiobank\user\your_sound.wav' in the entities destroy script but I'm now making assumptions that I can't confirm either way.

I'm sure someone will be able to provide you with a suitable script / best way of destroying a sound that is in use before playing another.
the ultimate gamer
18
Years of Service
User Offline
Joined: 30th Jul 2006
Location:
Posted: 10th Apr 2007 23:48
yeah ive tryed most of those but they didnt work. I probably did something wrong with the entity one. Thx for your help!

hi

Login to post a reply

Server time is: 2024-11-23 14:59:37
Your offset time is: 2024-11-23 14:59:37