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 triggering and interrupting former sound and then destroying it

Author
Message
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 10th Feb 2011 11:17 Edited at: 10th Feb 2011 11:19
Dear mates,

I needed a sound script for my game Conscious that is going to be a commercial game. I needed a sound script that plays the specified sound file, and interrupts the sound files that have the same name. It has to play the specified sound even if the former sound is still being played. For example, there is a wall on the picture, and there is a sound zone with voice acting .ogg near the picture. But the former zone contained a 6 minute sound file, so it is still being played. Of course, the voice acting has to interrupt the former zone, and play the voice acting file. And as all of our maps contain more voice acting files, and even more music, placed carefully on the storyline. So the sound zone(or at least the script or sound file) has to destroy after walking into the next zone, and should not be able to be picked up again. I mean the player should not be able to walk back into the zone. Imagine a fighting scene with a proper, fast paced music, but you run back into the former room because you are having no more than 5 health points, and this way you are able to shoot down the enemies without getting injured. However, there is the former sound zone, containing the voice acting(for example, admiring the picture or painting). A sentence like: "what a nice picture!" somehow does not fit into a fighting scene and no one wants to listen to it five times... you know, walking in the zone, walking out, walking back, walking out, walking back into it... and every time you enter, it starts playing the sound again and again. However it should not. Huh, I hope I could give a clear explanation regerding the problem.

Now, we have the scripts (from Plystire and Lee Bamber) that activates and interrupts other zones, however, it does not destroy. So the problem that we can walk back into it still persists.

Lee Bamber's script:






We really do have to find solution to our problem, as the game's storyline is based on these triggered sound zones. (player narrating) And it is really going to be a commercial game, as we have spent more than 450$ on the game and the accessories.(web site, etc., not mentioning the HD video camera) And the story really really worth a shot, it is not a commando thing, or war, or... so just none of these. Kinda unique. The story worth a shot even in Hollywood. So if you know a producer personally we are all ears. Please let us know.

Thank you very, very much!

Zoltan Szikra-Tóth,

http://www.conscious-game.com
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Feb 2011 02:17
I am curious about the results you had from the script I gave you:




That should do it. By setting the state BACK to 0 when the player leaves the zone (as per the script you posted), it WILL repeat the sound when the player re-enters the zone. The point of entering state 1 is so that the script enters an unused state and ceases to play sounds.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 11th Feb 2011 13:04
Did you know that you are actually a genius?!!?!?
It works! (I am going to test the script further anyway, as I can't believe my ears! ) Now I owe you a lot of money.

Thank you very much!

Zoli
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 11th Feb 2011 13:27
It works even if the player dies! That is EXACTLY how it should work
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 11th Feb 2011 21:42
I have noticed only one thing. The sound zones does not always load. This is not the script's fault, but it is weird, as it does not appear on every map, and it appears only sometimes. I don't see the logic in that. :S
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Feb 2011 23:21
That is very strange indeed.

Maybe you can set up a test level with just sound zones and try to figure out what's causing it?


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 16th Feb 2011 20:55
Uhh. I got it. LOL. The 9 minutes sound files were causing itDD After a few hours of testing I managed to undertsnd that FPSC doesn't like huge files. This is the case with my first map video too. The map is too big, and the video file does not play... But I will find an other way... possibly making a 1*1 segment closed map for the video file, and set it to IsObjective=2. But the problem is that I can't set the ambience lighting level to complete zero. Do you know how to do that? I mean, on all of the maps, I don't want any light, except the direct, static lights. But even if I set the ambience level from the global script to zero, it does not do anything...

Thank you!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Feb 2011 06:06
Hmmm, have you tried making a script that just sits there and sets the ambience to 0? It may not be the best solution to the problem, but it would let you know if it is indeed the fault of the global script not setting the ambience (or something else resetting the ambience to soemthing higher).

I know in test game, the ambience is forced to a certain value sometimes, which can override the global script ambience setting. Have you tried the ambience in a built game?


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 20th Feb 2011 18:28
I haven't. Thanks I am going to try to test that right now.
Huncut1
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location:
Posted: 20th Feb 2011 18:47
It's not working... but the red, green, blue ambience are set to 255. I have just tried stting them all to 0, and it worked, it was full black, I could not see anything, and the other map, where I had lighting, stayed nice I wasn't expecting ti to be so easy And the ambience level can not be changed by pressing the "," and "." buttons in the game, which is exactly what I wanted! You know, it is not the best to let the player change the lighting level of the map.
Anyway, did I do something wrong? I mean... it works now, but it does not mean I haven't caused a bigger problem.

Thank you very much Ply!

Login to post a reply

Server time is: 2024-11-24 11:40:04
Your offset time is: 2024-11-24 11:40:04