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
#9
RE: Script - Piano Music

Spelos Wrote:
Oh no!

While StopMusic is a function, YOU do not create that function. It is already declared in Amnesia.

You should just call the function instead.
Calling a function is a command.
You put the name of the function and fill its parameters.

For void StopMusic(float afFadeTime, int alPrio); the call command would be:
PHP Code: (Select All)
void OnStart()
{
    
StopMusic(1.0f10); // And you do this command in a function that happens at the time you want the music to stop.


the "1.0f" in the example is the time (in seconds) it takes to fade out the music.

And the "10" in the example is the priority of the music that will stop. You set the priority in the PlayMusic command:
Abihishi Wrote:PlayMusic("00_event_gallery.snt", true, 1, 0.1, 10, false);



And again... Even if you were to declare it as a function... (Which won't do anything, since it's not called & has nothing in it)

void StopMusic(15, int alPrio); <-- WHAT IS THIS, MAN?!
{

}

again, that is function. Functions DO NOT have semicolons!
Commands DO have semicolons.

PHP Code: (Select All)
void OnStart() // <-- This is a function, no ";" here.
{
    
Command(); // <-- This is a command, ";" has to be here!


Try to keep it in mind.
(This post was last modified: 02-27-2016, 03:59 PM by Spelos.)
02-27-2016, 01:32 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: 1 Guest(s)