The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Scripting
physcostealth Offline
Junior Member

Posts: 25
Threads: 12
Joined: Mar 2014
Reputation: 0
#1
Scripting

So I'm very new with the Amnesia custom story level editor and since I watched a lot of videos on scripting, I decided I'd give it a try with a simple function.

All I want to do is have the character walk through an area and then music starts, but no matter what I tried nothing happened. I'm not sure if I did something wrong in the script or whether my sound or text files are in the wrong place. Please help!

Here's the script:

void OnStart()
{
AddEntityCollideCallback("Player", "SoundArea", "crossarea", true, 1);
}

void crossarea(string &in asParent, string &in asChild, int alState)
{
PlayMusic("The_Patronus_Light.ogg", true, 0.0, 0, 1, false);
}
03-12-2014, 05:52 AM
Find


Messages In This Thread
Scripting - by physcostealth - 03-12-2014, 05:52 AM
RE: Scripting - by Romulator - 03-12-2014, 06:29 AM
RE: Scripting - by physcostealth - 03-12-2014, 06:35 AM
RE: Scripting - by Romulator - 03-12-2014, 07:27 AM
RE: Scripting - by physcostealth - 03-12-2014, 07:54 AM
RE: Scripting - by physcostealth - 03-12-2014, 08:05 AM
RE: Scripting - by Romulator - 03-12-2014, 08:04 AM
RE: Scripting - by Romulator - 03-12-2014, 08:05 AM



Users browsing this thread: 1 Guest(s)