Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crashing
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#1
Crashing

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...

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
03-09-2012, 04:11 PM
Website Find
Tiiwh Offline
Junior Member

Posts: 47
Threads: 6
Joined: Nov 2011
Reputation: 1
#2
RE: Crashing

Could you paste the hps.file?

[Image: deaceaf76907.gif]
03-09-2012, 04:35 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#3
RE: Crashing

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()
{

}

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 03-09-2012, 06:02 PM by GoranGaming.)
03-09-2012, 06:00 PM
Website Find
Tiiwh Offline
Junior Member

Posts: 47
Threads: 6
Joined: Nov 2011
Reputation: 1
#4
RE: Crashing

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?

[Image: deaceaf76907.gif]
03-09-2012, 06:08 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#5
RE: Crashing

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?

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 03-09-2012, 06:17 PM by GoranGaming.)
03-09-2012, 06:17 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Crashing

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.

Tutorials: From Noob to Pro
03-09-2012, 08:29 PM
Website Find




Users browsing this thread: 3 Guest(s)