Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Music playing while file not on my computer.
Author Message
MrIcabod123 Offline
Junior Member

Posts: 43
Joined: Jan 2012
Reputation: 0
Post: #1
Music playing while file not on my computer.

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","", "", "");
}


04-28-2012 12:21 AM
Find all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #2
RE: Music playing while file not on my computer.

Try deleting the map cache.

Noob scripting tutorial: From Noob to Pro

04-28-2012 12:26 AM
Find all posts by this user Quote this message in a reply
Xanthos Offline
Senior Member

Posts: 318
Joined: Mar 2012
Reputation: 8
Post: #3
RE: Music playing while file not on my computer.

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

04-28-2012 12:26 AM
Find all posts by this user Quote this message in a reply
narutohokager Offline
Member

Posts: 137
Joined: Jan 2011
Reputation: 0
Post: #4
RE: Music playing while file not on my computer.

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.

04-28-2012 12:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MrIcabod123 Offline
Junior Member

Posts: 43
Joined: Jan 2012
Reputation: 0
Post: #5
RE: Music playing while file not on my computer.

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.
04-28-2012 12:30 AM
Find all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #6
RE: Music playing while file not on my computer.

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

Noob scripting tutorial: From Noob to Pro

04-28-2012 12:36 AM
Find all posts by this user Quote this message in a reply
narutohokager Offline
Member

Posts: 137
Joined: Jan 2011
Reputation: 0
Post: #7
RE: Music playing while file not on my computer.

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

(This post was last modified: 04-28-2012 12:36 AM by narutohokager.)
04-28-2012 12:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MrIcabod123 Offline
Junior Member

Posts: 43
Joined: Jan 2012
Reputation: 0
Post: #8
RE: Music playing while file not on my computer.

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.
04-28-2012 12:41 AM
Find all posts by this user Quote this message in a reply
narutohokager Offline
Member

Posts: 137
Joined: Jan 2011
Reputation: 0
Post: #9
RE: Music playing while file not on my computer.

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.

(This post was last modified: 04-28-2012 12:55 AM by narutohokager.)
04-28-2012 12:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MrIcabod123 Offline
Junior Member

Posts: 43
Joined: Jan 2012
Reputation: 0
Post: #10
RE: Music playing while file not on my computer.

(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.
04-28-2012 12:59 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)