Frictional Games Forum (read-only)
Phonograph reset - 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 reset (/thread-23456.html)



Phonograph reset - Cyphermur9t - 09-30-2013

In my CS I have a certain function where the Phonograph playing spawns a monster. Everything works fine there, however if the monster kills you I want the phonograph to reset back to its non-woundup state to be played again. (The monster has to spawn to break down a locked door). I thought the ResetProp("phonograph_1"); command would do the trick. The game detects no coding error yet this does not work. You cannot wind up the phonograph anymore. Is there a specific certain code for those props?

Code:
void Restart(string &in asParent, string &in asChild, int alState)
{
    CheckPoint ("checkpoint1", "PlayerStartArea_4", "Urstuff", "DeathCategory", "Deathtext1");
}

void Urstuff (string &in asName, int alCount)
{
    SetEntityConnectionStateChangeCallback("phonograph_1", "play_radio");

    ResetProp("phonograph_1");
}



RE: Phonograph reset - Cyphermur9t - 10-04-2013

nothing??


RE: Phonograph reset - Robby - 10-04-2013

I did script back in Amnesia before, but I no longer know the scripts all too well, but I think ResetProp might not work in your case. I'm not sure, though, I didn't script in Amnesia since 2 years, I believe.


RE: Phonograph reset - Apjjm - 10-05-2013

Phonograph is a wheel type entity if i am not mistaken, so something like:
Code:
SetWheelAngle("phonograph_1",-180,false);
should do the trick.


RE: Phonograph reset - Cyphermur9t - 10-06-2013

Thank you. It worked out fine. Smile