![]() |
[SCRIPT] which signature shall i have on "PlayMusic" pls 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: [SCRIPT] which signature shall i have on "PlayMusic" pls help (/thread-13822.html) |
which signature shall i have on "PlayMusic" pls help - RumpNissen - 03-07-2012 i am new to scripting. so i tried to solve this by my own but i couldn't. so i thought other eyes and those who have more experience could help me out. Here is my script void OnStart() { AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1); AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1); AddEntityCollideCallback("Player", "Hanging", "Hang", true,1); AddEntityCollideCallback("Hagingman", "Hanging", "Soound", true, 1); AddEntityCollideCallback("Player", "Music", "StartMusic", true, 1); } void StartMusic(string &in asParent, string &in asChild, int alState) { PlayMusic("general_rain.ogg", true, 0.8, 2, 1, true); } void HolyJesus(string &in asParent, string &in asChild, int alState) { SetEntityActive("Jesus_1", true); AddPropForce("Jesus_1", 0, 0, 0, "World"); } void Sound(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "24_iron_maiden.snt", "FlyingJesus_1", 0, false); } void Hang(string &in asParent, string &in asChild, int alState) { SetEntityActive("Hagingman", true); } void Soound(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "24_iron_maiden.snt", "Hanging", true, 1); } void OnLeave() { } RE: which signature shall i have on "PlayMusic" pls help - Linus Ă…gren - 03-07-2012 Isn't general_rain.ogg in the "sounds" folder? In that case, use PlaySoundAtEntity. |