Frictional Games Forum (read-only)

Full Version: Cant get this music in map to wrok
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey i cant get this music to work ingame :S
this is what i have in script for the sound "PlayMusic("ambience_voice.ogg", true, 3, 1, 0, true);
StopMusic(1, int alPrio);"

In the stopmusic i dont understand the last one any tip
(01-04-2012, 01:08 AM)jessehmusic Wrote: [ -> ]Hey i cant get this music to work ingame :S
this is what i have in script for the sound "PlayMusic("ambience_voice.ogg", true, 3, 1, 0, true);
StopMusic(1, int alPrio);"

In the stopmusic i dont understand the last one any tip
It's the priority setting for the "PlayMusic"... In this case, it's priority is "0". Change it to something else like 5. For example, like this:

PlayMusic("ambience_voice.ogg", true, 3, 1, 5, true);
StopMusic(1, 5);

[edit: too late]
Got some error at 25,1
PHP Code:
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever""func_shelf");
}

void func_shelf(string &in asEntityint alState)
{
    if (
alState == 1)
    {
    
SetMoveObjectState("shelf",1.0f);
    
PlaySoundAtEntity("""quest_completed.snt""shelf_move_1"0false); }
}
 
  
void StopTimer(string &in asTimer)
 {
  
StopPlayerLookAt();
 }
 
 
void PickNote(string &in asEntity)
 {
 
StartPlayerLookAt("closet_1"5.0f5.0f"");
 
AddTimer("StopLookAt"1.5f"StopTimer");
 }
 
{
 
PlayMusic("ambience_voice.ogg"true315true); 
 
StopMusic(15);
 } 

AddCallback and syntax.

void StopTimer(string &in asTimer){
PlayMusic("ambience_voice.ogg", true, 3, 1, 5, true);
StopMusic(1, 5);
}
How is that callback called Still new :S
(01-04-2012, 02:12 AM)jessehmusic Wrote: [ -> ]How is that callback called Still new :S
Just put "void StopTimer(string &in asTimer)" above the "PlayMusic" functions... Play around and study a bit.


Here is the FG wiki:
http://wiki.frictionalgames.com/hpl2/amn...Atutorials
Hmmm cant find Sad