Frictional Games Forum (read-only)
Phonograph and Waxroll HELP - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Phonograph and Waxroll HELP (/thread-22081.html)



Phonograph and Waxroll HELP - iLucian - 07-10-2013

So i am making a custom story and i want u to b able to find a waxroll record and put it in the phonograph, then crank it up and it plays music. Ive been searching for scripts and tutorials on how to do that and so far nothing has come up! Can someone plz help me!


RE: Phonograph and Waxroll HELP - Daemian - 07-10-2013

Open a Justine's map, check its code.

Sorry i gave you a short answer but that's about it.
For the music you may need the function PlaySoundAtEntity instead of PlayMusic.
So you can center the music on the phonograph thing.


RE: Phonograph and Waxroll HELP - PutraenusAlivius - 07-12-2013

Code:
void OnStart()
{
SetLocalVarInt("PhonographWax", 0);
AddUseItemCallback("", "WaxRoll", "Phonograph", "EnablePhono", true);
SetMultiSliderCallback("Phonograph", "PlayMusic");
}

void EnablePhono(string &in asItem, string &in asEntity)
{
AddLocalVarInt("PhonographWax", 1);
}

void PlayMusic(string &in asEntity, int alState)
{
if(GetLocalVarInt("PhonographWax") == 1)
{
PlaySoundAtEntity("", "sound.snt", "Phonograph", 0.1f, false);
}

else
{
}
}