Frictional Games Forum (read-only)

Full Version: Torture Rooms Sanity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I Leave ScriptArea2 Timer work all the time. I try used script from original map but I have the same problem

Code:
//SCRIPTAREA1
void Zgroza(string &in asTimer)
{
FadeImageTrailTo(1.2f, 0.5f);
PlaySoundAtEntity("", "ui_torture.ent", "Player", 10, true);
GiveSanityDamage(1, false);
AddTimer("", 4.0, "Zgroza");
}

//SCRIPTAREA2
void Strach2(string &in asParent, string &in asChild, int alState)
{
RemoveTimer("Zgroza");
}
Try using AddTimer("Zgroza", 4.0, "Zgroza"); instead of the one you're using now. RemoveTimer(string& asName); uses the name of the timer, but you've set that to "", therefor, it doesn't work.
Ohh I see i'm stupid ;]
No, is still as was ;/
That's the name of the timer that you can leave it be.
This is the error:

ui_torture.ent.

It's ui_torture.snt actually, ent is another type of file, that's why it isn't working Wink

And if it isnt still working I need a bigger piece of script. Wink
No sorry this is not reason
It is an error from the sound tho so I solved the sound actually. Send me a bigger piece of script please..
(07-03-2011, 10:02 PM)Hardarm Wrote: [ -> ]It is an error from the sound tho so I solved the sound actually. Send me a bigger piece of script please..

His problem is that the TIMER isn't getting removed. Get it? You don't need a bigger piece of script. Everything works out fine, he can play and whatsoever, but the timer doesn't get removed by his functions nr. 2.