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
Need help with scripting music to areas
scj0nes Offline
Junior Member

Posts: 1
Threads: 1
Joined: Apr 2014
Reputation: 0
#1
Information  Need help with scripting music to areas

Hi all,

I am currently working on a mod in Amnesia the dark descent for a project for my dissertation. My only problem is that I need to include different music to the different rooms for my experiment at hand. Only problem is that ... i have no idea how to add it to my current script and I am really struggling trying to add it to area boxes.

This is my current code:

Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "locked_door1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("locked_door1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false);
RemoveItem("key_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster_grunt", true);
ShowEnemyPlayerPosition("monster_grunt");
}


////////////////////////////
// Run when entering map
void OnEnter()
{
FadeOut(0);

FadeIn(50);
AddEntityCollideCallback("Player", "Bedroom", "Start", true, 1);
}
void start(string &in asParent, string &in asChild, int alstate)
{
PlaySoundAtEntity("", "06_amb.ogg", "Player", 0, false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Any heads up would be greatly appreciated Smile Thanks
04-03-2014, 02:55 PM
Find


Messages In This Thread
Need help with scripting music to areas - by scj0nes - 04-03-2014, 02:55 PM



Users browsing this thread: 2 Guest(s)