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



Crashing - GoranGaming - 03-09-2012

Amnesia crashes when I load my map. You can watch this video and you will understand what the problem is:

http://www.youtube.com/watch?v=5pdVhYAi8js


When you get killed by the brute the game is supposed to load a new map. It worked before, but not anymore...


RE: Crashing - Tiiwh - 03-09-2012

Could you paste the hps.file?


RE: Crashing - GoranGaming - 03-09-2012

From which map?
This is from the map in the video:


void BigDoorFunc(string &in Entity)
{
PlaySoundAtEntity("locked_door", "locked_door.snt", "BigDoor", 0, true);
SetMessage("Messages", "MainHallDoor", 1);
}

void UnlockDoor(string &in asItem, string &in asEntity)
{
SetEntityActive("BigDoor", false);
PlaySoundAtEntity("", "unlock_door.snt", "BigDoor", 0, false);
AddTimer("monsterhit", 0, "MonsterHitT");
}

void MonsterHitT(string &in Timer)
{
StartPlayerLookAt("LookAt", 1, 1, "");
AddTimer("monsterhit2", 1, "MonsterHit2T");
}
void MonsterHit2T(string &in Timer)
{
//PlaySoundAtEntity("enabled", "enabled.snt", "Player", 0, true);
AddTimer("startterrormusic", 0, "StartTerrorT");
//PlaySoundAtEntity("amb_idle02", "amb_idle02.ogg", "Player", 0, true);
}
void StartTerrorT(string &in Timer)
{
AddTimer("teleport", 3.5f, "TeleportPlayer1");
SetDeathHint("DeathHint", "End");
SetPlayerHealth(50);
StopPlayerLookAt();
StartPlayerLookAt("servant_brute_1", 10, 7, "");
SetEntityActive("servant_brute_1", true);
ShowEnemyPlayerPosition("servant_brute_1");
//PlaySoundAtEntity("ui_terror_meter", "ui_terror_meter.snt", "Player", 1, true);
/*AddTimer("sound1", 0.5f, "MonsterEvent");
AddTimer("sound2", 1.0f, "MonsterEvent");
AddTimer("sound3", 1.5f, "MonsterEvent");
AddTimer("sound4", 2.0f, "MonsterEvent");
AddTimer("sound5", 2.5f, "MonsterEvent");
AddTimer("sound6", 3.0f, "MonsterEvent");*/

}

void TeleportPlayer1(string &in Timer)
{
ChangeMap("06_end_room.map", "PlayerStartArea_1", "", "");
}

void OnStart()
{
//EDITOR
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i< 10;i++) GiveItemFromFile("potion_sanity_"+i, "potion_sanity.ent");
//End of EDITOR


AddUseItemCallback("", "BigDoorKey", "BigDoor", "UnlockDoor", false);
}

void OnEnter()
{

}

void OnLeave()
{

}

And this is from the map that you are supposed to be teleported to:



void OnStart()
{
StopPlayerLookAt();

GiveSanityDamage(99, false);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeImageTrailTo(2, 2);
FadePlayerRollTo(50, 220, 220);
FadeOut(0);
FadeIn(3);
AddTimer("StartMusic", 8, "Intro");
AddTimer("T1", 11, "Intro");
AddTimer("T2", 14, "Intro");
AddTimer("T3", 17, "Intro");
AddTimer("T4", 20, "Intro");
AddTimer("T5", 23, "Intro");
AddTimer("T6", 26, "Intro");
AddTimer("T7", 29, "Intro");
AddTimer("RollCredits", 36, "Intro");

}

void Intro(string &in asTimer)
{
string x = asTimer;
if (x == "StartMusic")
{

PlayMusic("ending_alexander.ogg", true, 10, 2, 1, true);
}
else if (x == "T1")
{

FadeOut(3);
}
else if (x == "T2")
{
FadeIn(3);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
StartPlayerLookAt("ScriptArea_1", 2, 2, "");
}
else if (x == "T3")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_2", 2, 2, "");
}
else if (x == "T4")
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
StopPlayerLookAt();
}
else if (x == "T5")
{
SetPlayerCrouching(false);
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeImageTrailTo(0, 1);
}
else if (x == "T6")
{
SetMessage("Messages", "EndMessage1", 4);
}
else if (x == "T7")
{
SetMessage("Messages", "EndMessage2", 4);
}
else if (x == "RollCredits")
{
StopMusic();
StartCredits("ending_agrippa.ogg", false, "Ending", "MainCredits", 0);
}

}

void OnEnter()
{

}

void OnLeave()
{

}



RE: Crashing - Tiiwh - 03-09-2012

What is the name of the script area for the first map for the start player area? Like, what is the name of the start area on the first map? Since the ChangeMap("06_end_room.map", "PlayerStartArea_1", "", "");
is for the first map am I right? Didn't you wanted the player to teleport to the second map?



RE: Crashing - GoranGaming - 03-09-2012

Yes I did. But when I added a few lines of code, it crashed. I din't get a script error.

I want the player to be teleported from "05_main_hall" ---> "06_end_room". As I said, it did work. The PlayerStartArea for 05_main_hall is called "PlayerStartArea_1" and so is the start area for 06_end_room.
Btw, did you watch the video?


RE: Crashing - Your Computer - 03-09-2012

If it were a script error or if the map didn't exist, you'd receive an error dialog saying so. Play the game until it crashes again, then post the hpl.log.