Marche100
Junior Member
Posts: 18
Threads: 3
Joined: Aug 2011
Reputation:
0
|
RE: Amnesia Crashing When Playing Custom Story
(08-21-2011, 03:27 AM)Your Computer Wrote: Warnings do not crash the game. The problem is probably in the .hps file.
You mean the level's .hps file? I don't see a problem with it, but here it is, if that's any help.
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "Lantern_Quest_Area", "GetLanternQuest", true, 0);
AddEntityCollideCallback("Player", "Lantern_Complete_Area", "FinishLanternQuest", true, 0);
AddEntityCollideCallback("Player", "Study_Quest_Area", "GetStudyQuest", true, 0);
AddEntityCollideCallback("Player", "Study_Complete_Area", "FinishStudyQuest", true, 0);
AddUseItemCallback("", "lantern", "", "", true);
SetEntityCallbackFunc("lantern", "OnPickup");
AddEntityCollideCallback("servant_grunt_1", "area51", "monsterDelete", true, 0);
AddUseItemCallback("", "studykey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void GetLanternQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("lanternquest", "LanternQuest");
}
void FinishLanternQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("lanternquest", "LanternQuest");
}
void GetStudyQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("studyquest", "'StudyQuest");
}
void FinishStudyQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("studyquest", "StudyQuest");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
AddTimer("Timer", 25.0, "MonsterGone");
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 10, "");
}
void monsterDelete(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
}
void MonsterGone(string&in asTimer)
{
SetEntityActive("servant_grunt_1", false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("studykey_1");
}
(This post was last modified: 08-21-2011, 11:23 AM by Marche100.)
|
|