AddEntityCollideCallback("Player", "YOURAREAINTHEEDITOR", "SoundatGarden", false, 0);
void SoundatGarden(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlaySoundAtEntity("STOPGARDENSOUNDS", "YOUR.snt", "Player", 0, false);
}
if(alState == -1)
{
StopSound("STOPGARDENSOUNDS", 3);// the number 3 is 3 seconds to fade out to no sounds.
}
}
Quote:*-*-* You should play a little bit around for the loops and loudness, this is just one of my examples i show to you.
---
What this does is :
IF you are INSIDE the scriptarea (in your editor) the music {Playsoundatentity} will be played.
then..
IF you are NOT inside the area anymore the sound will stop playing .. after the 3 seconds of fadeout.
THIS is a very heplfull thing, remeber this, you can do a lot with this function.
Good luck with your story.