(01-23-2012, 09:56 PM)palistov Wrote: Are you making a full conversion? The only script-related ways to crash Amnesia (that I know of) are:
1) breaking joints on doors/levers via BreakJoint() script
2) infinite loops such as for(; or while loops which do not complete
So check your scripts, and make sure you're not doing any of those. Also try creating a global.hps file and place it in your custom story's maps folder. Only reason I mention this is because I've gotten script-related errors in global.hps even when it doesn't exist, which have caused me to crash.
//in your global.hps put
void OnGameStart(){}
I have a for loop in my hps File for a Patroulling Grunt which should cycle the path nodes all the time. This script works fine i tested it before the game started to crash so i think thiss is a random Error which occurs by time.
I will try to create a global.hps file and see if this helps
(01-23-2012, 09:37 PM)Statyk Wrote: Can you post your .hps?
void OnStart()
{
AddEntityCollideCallback("Player", "grunt1_activate", "activeGrunt", true, 1);
AddEntityCollideCallback("Player", "scare1_area", "activeScare", true, 1);
AddEntityCollideCallback("Player", "activate_scare1", "sackfall", true, 1);
AddEntityCollideCallback("Player", "activate_show", "afblargh", true, 1);
AddEntityCollideCallback("Player", "grunt1brute1_showposition", "afblargh2", true, 1);
AddEntityCollideCallback("Player", "Frauenschrei", "scream", true, 1);
AddUseItemCallback("", "key_leverroom", "castle_4", "Aufschliessen", true);
SetEntityConnectionStateChangeCallback("lever_2", "leveldoorunlock");
CheckPoint ("", "PlayerStartArea_1", "Checkpoint1", "Death", "DeathHint1");
}
void activeGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_1", true);
for (int i = 1; i <13; i++)
{
AddEnemyPatrolNode("grunt_1", "Pathgrunt_1", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_2", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_3", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_4", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_5", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_6", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_7", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_8", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_9", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_10", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_11", 0, "");
AddEnemyPatrolNode("grunt_1", "Pathgrunt_12", 0, "");
}
}
void activeScare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("activate_scare1", true);
}
void sackfall(string &in asParent, string &in asChild, int alState)
{
AddPropForce("bag01_4" , 0, 0, -400, "World");
}
void Aufschliessen(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_4", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_4", 0, false);
RemoveItem("key_leverroom");
}
void leveldoorunlock(string &in asEntity, int alState)
{
if (alState == 1)
{
StartScreenShake(0.02f, 0, 0.5f, 1.0f);
SetLevelDoorLocked("level_cellar", false);
return;
}
}
void afblargh(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1brute1_showposition", true);
}
void afblargh2(string &in asParent, string &in asChild, int alState)
{
ShowEnemyPlayerPosition("grunt_1");
}
void scream(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "21_screams.snt", "Player", 0, true);
}
void Checkpoint1(string &in asName, int alCount)
{
ChangeMap("Keller2.map", "PlayerStartArea_1", "", "");
}
there you are
Ive now got the version of my teampartner and it works fine... im just thinking about that the game missed the mapcache files cause i delte them every time the map is changing (this is logic ^^)
the game does the same error with different reasons. so some time the game is crashing without any error (see the first post), and sometimes it says:
ERROR: Could not open binary file 'c:/program files/steam/steamapps/common/amnesia the dark descent/custom_stories/Custom Story GregorMarco/maps/Archive.map_cache'
so i will decide to restart evry time i think the crash without error will disappear after the global.hps file.
thanks to you
glad i got help
CoReStAtiC