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 - Piano Music
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#2
RE: Script - Piano Music

All you will actually need is a Script Area.
Remember the name of that Script Area.

PHP Code: (Select All)
void OnStart()
{
    
// It is a good practice to pre-load your .snt sounds before you use it.
    
PreloadSound("general_piano01.snt");
    
    
SetEntityPlayerInteractCallback("NameOfArea""PianoFunc"false);
}

void PianoFunc(string &in asEntity)
{
    
StopSound("PianoSound"0.5f); //Prevents it from playing twice when spamming.
    
PlaySoundAtEntity("PianoSound""general_piano01.snt""NameOfArea"0.5ffalse);


But don't forget to edit it to fit your situation.
NameOfArea should be the name of your area (and there are 2 of them in the script)
The music is from Amnesia and has this fade effect. To remove that use your own music.
If using your own music you will have to create your own .snt file.
Just open an existing .snt file in notepad and copy its content and edit it to apply to your music file.

If something is not clear you could check the
Amnesia Bible
(This post was last modified: 02-26-2016, 03:33 PM by Spelos.)
02-26-2016, 03:09 PM
Find


Messages In This Thread
Script - Piano Music - by Abihishi - 02-26-2016, 02:47 PM
RE: Script - Piano Music - by Spelos - 02-26-2016, 03:09 PM
RE: Script - Piano Music - by Abihishi - 02-26-2016, 04:47 PM
RE: Script - Piano Music - by Spelos - 02-26-2016, 05:51 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 10:32 AM
RE: Script - Piano Music - by Spelos - 02-27-2016, 11:03 AM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 11:55 AM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 01:19 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 01:32 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 02:54 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 03:16 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 03:50 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 03:58 PM
RE: Script - Piano Music - by Abihishi - 02-27-2016, 06:37 PM
RE: Script - Piano Music - by Spelos - 02-27-2016, 07:21 PM
RE: Script - Piano Music - by Abihishi - 02-28-2016, 12:11 PM
RE: Script - Piano Music - by Spelos - 02-28-2016, 12:45 PM
RE: Script - Piano Music - by Abihishi - 02-28-2016, 12:51 PM
RE: Script - Piano Music - by Spelos - 02-28-2016, 01:04 PM
RE: Script - Piano Music - by Mudbill - 02-28-2016, 06:02 PM
RE: Script - Piano Music - by Spelos - 02-28-2016, 08:12 PM
RE: Script - Piano Music - by Abihishi - 02-29-2016, 05:35 PM
RE: Script - Piano Music - by Spelos - 02-29-2016, 07:41 PM
RE: Script - Piano Music - by Abihishi - 02-29-2016, 08:11 PM
RE: Script - Piano Music - by Abihishi - 03-01-2016, 05:14 PM
RE: Script - Piano Music - by Spelos - 03-01-2016, 05:19 PM
RE: Script - Piano Music - by Abihishi - 03-01-2016, 05:44 PM
RE: Script - Piano Music - by Spelos - 03-01-2016, 05:54 PM
RE: Script - Piano Music - by Abihishi - 03-01-2016, 06:53 PM



Users browsing this thread: 2 Guest(s)