Frictional Games Forum (read-only)
Stop music - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Stop music (/thread-8473.html)

Pages: 1 2


RE: Stop music - xtron - 06-06-2011

so what should I use for this code:
Code:
void func_piano1_disapear(string &in asParent, string &in asChild, int alState)
{
StopMusic( 0, 1);
StartPlayerLookAt("piano1", 10, 50, "");
AddTimer("", 0.5f, "TimerDestroyPiano1");
}

void TimerDestroyPiano1(string &in asTimer)
{
SetPropHealth("piano1", -100);
PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false);
GiveSanityDamage(4.0f, true);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
AddTimer("", 1.0f, "TimerStopLook1");
}

void TimerStopLook1(string &in asTimer)
{
StopPlayerLookAt();
}





RE: Stop music - Tanshaydar - 06-06-2011

Is this all your hps file?
What is it that doesn't work?


RE: Stop music - xtron - 06-06-2011

It's just a function.

I'm trying to fix so when the player enters a specific area the piano destorys "SetPropHealth("piano1", -100);". Everything is working except the "setprophealth" function.


RE: Stop music - Greven - 06-06-2011

When it says set prop health you should write like this:
SetPropHealth("piano1", 0); Its like a health bar, you set its current hp.
So now if its 0 it means the prop has 0 health and is destroyed completely.


RE: Stop music - xtron - 06-06-2011

Doesn't work :S


RE: Stop music - Khyrpa - 06-06-2011

Are you sure piano can actually be destroyed?


RE: Stop music - xtron - 06-06-2011

Nevermind...I erased the script ^^. Don't need it.

Thanks for the help btw Tongue