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 / Problems with loopsound

Author
Message
Blahguy
13
Years of Service
User Offline
Joined: 12th Dec 2010
Location: The Void
Posted: 24th Feb 2011 15:22 Edited at: 24th Feb 2011 15:23
So yeah in my level I have the player starting in a Sound Zone which I have looping the sound file specified in it's .fpi script. However I have another sound zone later which needs to be able to stop the sound already looping and start looping a different one. I thought I coded it right, but the second sound zone does nothing. Please help, here's the .fpi scripts I use, and attached is the .fpm level if you really want it.

repeatsound.fpi:


user/repeatsound2.fpi:

Any and all help is greatly appreciated!

Attachments

Login to view attachments
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 24th Feb 2011 19:36
hmmm i'm not totally ure what your're trying to achieve.

Do you want the second sound zone to stop the sound played by the first sound zone? If so i have a couple of hints & tips.

i) you may want to use the "plrinzone=1" condition so that sound zone 2 doesn't do anything until the player is in the zone.

ii) you don't need to keep calling the main fpi with "runfpidefault=1" the main fpi will run continuously until the entity is destroyed.

iii) you don't need to set the alpha fade for a zone as they are invisible anyway.

iv) try changing the activation state condition and action to "activated=10" and "activatetarget=10" as the entity may already be at activated=1.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Blahguy
13
Years of Service
User Offline
Joined: 12th Dec 2010
Location: The Void
Posted: 25th Feb 2011 00:57 Edited at: 25th Feb 2011 00:58
here's what i have now it almost works exactly as I want it to.
repeatsound.fpi:

user/repeatsound2.fpi

Attached is the newest version of the level if you want it.

So what I want to happen is that SoundZone2 will activate and loop it's sound when the player enters it's zone and stop the sound from SoundZone2. But when a certain entity is destroyed (the last one in that area) that entity activates SoundZone2 with
Quote: "activatetarget=20"
so that SoundZone2 stops looping, and it goes back to looping SoundZone1. This works until the second SoundZone2, which does not work, i.e. when the player walks by the same background music from SoundZone1 continues playing.

All help is greatly appreciated!!

Attachments

Login to view attachments
Blahguy
13
Years of Service
User Offline
Joined: 12th Dec 2010
Location: The Void
Posted: 25th Feb 2011 23:41 Edited at: 25th Feb 2011 23:44
Ok I've figured out why. The second sound zone is on layer 6 and when I move it (still on layer 6) and walk under the sound zone, it activates. Here's a snapshot of the map so u can see what I'm talking about.

So the problem is now how to I get the white area up to the 6th layer?

*EDIT* I fixed it. I'm stupid. Thanks for ur help Ched80!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 11:36:55
Your offset time is: 2024-11-24 11:36:55