Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Cant get this music in map to wrok
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#1
Cant get this music in map to wrok

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

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-04-2012, 01:08 AM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Cant get this music in map to wrok

(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);

01-04-2012, 01:30 AM
Find
Kurton Offline
Senior Member

Posts: 533
Threads: 8
Joined: Oct 2010
Reputation: 16
#3
RE: Cant get this music in map to wrok

[edit: too late]

(This post was last modified: 01-04-2012, 01:30 AM by Kurton.)
01-04-2012, 01:30 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#4
RE: Cant get this music in map to wrok

Got some error at 25,1
PHP Code: (Select All)
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);
 } 

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-04-2012, 01:40 AM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#5
RE: Cant get this music in map to wrok


AddCallback and syntax.

void StopTimer(string &in asTimer){
PlayMusic("ambience_voice.ogg", true, 3, 1, 5, true);
StopMusic(1, 5);
}
01-04-2012, 02:00 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#6
RE: Cant get this music in map to wrok

How is that callback called Still new :S

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-04-2012, 02:12 AM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#7
RE: Cant get this music in map to wrok

(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
(This post was last modified: 01-04-2012, 02:40 AM by Statyk.)
01-04-2012, 02:40 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#8
RE: Cant get this music in map to wrok

Hmmm cant find Sad

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 01-04-2012, 06:53 AM by jessehmusic.)
01-04-2012, 06:51 AM
Website Find




Users browsing this thread: 1 Guest(s)