Frictional Games Forum (read-only)
[SCRIPT] Music playing while file not on my computer. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Music playing while file not on my computer. (/thread-15136.html)

Pages: 1 2 3


Music playing while file not on my computer. - MrIcabod123 - 04-28-2012

Hey guys, I guess you can infer from the title what my problem is; I have music playing when I start the map, yet the music file isn't on my computer. It used to work fine, I would enter a room and the music would start, very simple, yet all of a sudden it started playing on start up, without even being close to the script zone. I then deleted the function, script zone, and Callback, yet it was still playing. I then removed the file from my computer completely, but it still plays.

If anyone could help me it would be greatly appreciated.

Mike.

(Here's the .hps file if it helps)


Spoiler below!


void OnStart()
{
//Stuff
AddUseItemCallback("", "Sec_Blue_1", "Security_Panel_3", "Unlock_Door_1", true);
//CollideCallBacks
AddEntityCollideCallback("Player", "Death", "Fall", false, 1);
AddEntityCollideCallback("Player", "Music_1", "MusicPlay_1", true, 1);
AddEntityCollideCallback("Player", "intro", "cr1", true, 1);
}

void cr1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "general_speaker_noise.snt", "Player", 0, false);
PlaySoundAtEntity("", "CR_1.snt", "Player", 0, false);
}

void Unlock_Door_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_infected_1", false, true);
PlaySoundAtEntity("", "Security_Slide_1.snt", "door_infected_1", 0, false);
}


void MusicPlay_1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Penumbra_BP_A15.ogg", true, 2, 3, 0, true);
}

void Fall(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(200, "Fall", true, true);
CheckPoint("checkpoint1","CP_1","", "", "");
}





RE: Music playing while file not on my computer. - Cranky Old Man - 04-28-2012

Try deleting the map cache.



RE: Music playing while file not on my computer. - Xanthos - 04-28-2012

Maybe you overwrite one of the sound files that play with that old music.


RE: Music playing while file not on my computer. - narutohokager - 04-28-2012

Hi
In your maps folder, do you have a file with extension map_cache ? If yes, delete it and try again.

Often this file is that was causing me problems, it keeps the map settings to load faster next time.




RE: Music playing while file not on my computer. - MrIcabod123 - 04-28-2012

I don't have a cache file, and I didn't overwrite any other music, because none of them are scripted to play on star tup.


RE: Music playing while file not on my computer. - Cranky Old Man - 04-28-2012

Is this music by any chance on a CD that's in your CD drive?



RE: Music playing while file not on my computer. - narutohokager - 04-28-2012

Try that, i think its gonna work Wink
Code:
void OnEnter()
{
    StopMusic(0, 0);
}



RE: Music playing while file not on my computer. - MrIcabod123 - 04-28-2012

Quote: Is this music by any chance on a CD that's in your CD drive?
Nope, it was on my computer, if it helps it was "Penumbra_BP_A6"

Quote: Try that, i think its gonna work [Image: wink.gif]
Still plays the music after about 5 seconds of the map starting.



RE: Music playing while file not on my computer. - narutohokager - 04-28-2012

Try to delete :
AddEntityCollideCallback("Player", "Music_1", "MusicPlay_1", true, 1);
And
void MusicPlay_1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Penumbra_BP_A15.ogg", true, 2, 3, 0, true);
}
Are you sure the area that activates the music is not too close to the start ?

At worst, selects all the objects of your map and exports, create a new map, and imports objects and try without script. It's about what I do sometimes when I can't solve a problem.

If its work without the music starts up by itself, restores the script file, part from part.




RE: Music playing while file not on my computer. - MrIcabod123 - 04-28-2012

(04-28-2012, 12:53 AM)narutohokager Wrote: Try to delete :
AddEntityCollideCallback("Player", "Music_1", "MusicPlay_1", true, 1);
And
void MusicPlay_1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Penumbra_BP_A15.ogg", true, 2, 3, 0, true);
}
Are you sure the area that activates the music is not too close to the start ?

At worst, selects all the objects of your map and exports, create a new map, and imports objects and try without script. It's about what I do sometimes when I can't solve a problem.

If its work without the music starts up by itself, restores the script file, part from part.
Tried it, didn't work. The music file "Penumbra_BP_A15" isn't even the one that's playing, the one playing is off my computer entirely, and the import didn't change anything.