Frictional Games Forum (read-only)
Crashing Script - 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: Crashing Script (/thread-10142.html)



Crashing Script - JetlinerX - 09-03-2011

Hello all!

So far, these are the only types of problems I havent figured out. My game crashes when entering another map, but when whole script is removed, it works. CODE:

Code:
void OnStart ()
{
        AddEntityCollideCallback("Player", "HospitalPics", "Pics", true, 1);
        AddEntityCollideCallback("Player", "ScriptArea_1", "Picsmom", true, 1);
        AddEntityCollideCallback("Player", "ScriptArea_2", "Picsassistant", true, 1);
        AddEntityCollideCallback("Player", "ScriptArea_3", "Picsdad", true, 1);
        AddEntityCollideCallback("Player", "DontGo", "DontGo", true, 1);
        AddEntityCollideCallback("Player", "Mom", "Mom", true, 1);
        SetEntityCallbackFunc("note_generic_1", "OnPickup");
}
void Pics(string &in asParent, string &in asChild, int alState)
{        
        SetMessage("Messages", "pics", 0);
        StartPlayerLookAt("paintings_strange03_1", 2.0f, 2.0f, "");
}
void Picsmom(string &in asParent, string &in asChild, int alState)
{        
        SetMessage("Messages", "picsmom", 0);
        StartPlayerLookAt("paintings_strange04_1", 2.0f, 2.0f, "");
}
void Picsassistant(string &in asParent, string &in asChild, int alState)
{        
        SetMessage("Messages", "picsassistant", 0);
        StartPlayerLookAt("paintings_strange03_1", 2.0f, 2.0f, "");
}
void Picsdad(string &in asParent, string &in asChild, int alState)
{        
        SetMessage("Messages", "picsdad", 0);
        StartPlayerLookAt("paintings_strange03_1", 2.0f, 2.0f, "");
}
void Picsdad(string &in asParent, string &in asChild, int alState)
{        
        SetMessage("Messages", "DontGo", 0);
}
void OnPickup(string &in asEntity, string &in type)
{
        SetEntityActive("Mom", true);
}
void Mom(string &in asParent, string &in asChild, int alState)
{    
        SetMessage("Messages", "Mom", 0);
}
void OnLeave ()
{

}

FORGET IT!

SOLVED! Thanks!