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
Custom Story isn't working
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#1
Solved: 8 Years, 8 Months, 3 Weeks ago Custom Story isn't working

Alright so i have 2 maps so far to my custom story, it all has been working until JUST now. I start off in the first map and when i clikc the door to the second map, it loads for a split second then crashes and says its not working, nothing pops up saying any kind of error, but i have no idea what it can be. Maybe someone can help.

This is my hps file for the second map

//////////////////////////////////////////////////////////////////////////////////
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
}

void UsedKeyOnCuboard(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cuboard_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cuboard_1", 0, false);
RemoveItem("key_study_1");
}

void UsedKeyUpstairs(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEntity("", "unlock_door", "door2", 0, false);
RemoveItem("key_tower_1");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0, false);
RemoveItem("key_study_2");
}

void MonsterWalk(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 15.0f, "");
GiveSanityDamage(10.0f, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
AddTimer("servant_grunt_1", 15.0f, "TimerMonster");
SetMessage("Journal, "OhGod", 5.0f);
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveItem("key_study_3");
}

void TimerMonster(string &in asTimer)
{
AddTimer("servant_grunt_1", 30.0f, "StopMonster");
}

void StopMonster(string &in asTimer)
{
SetEntityActive("servant_grunt_1", false);
}
//////////////////////////////////////////////////////////////////////////////////

And this is my hpl.log, the only thing that says there was an error, but i dont quite understand it.

//////////////////////////////////////////////////////////////////////////////////
-------- Loading map 'Testing.map' ---------
Cache Loading: 2486 ms
Entities: 5137 ms
Compilation: 14 ms
Total: 7688 ms
Meshes created: 71
Bodies created: 30
-------- Loading complete ---------
WARNING: Entity 'wall_default02_2' does not exist!
WARNING: Could not find language file category 'Messages'
ERROR: Couldn't texture ''
ERROR: Could not load texture ''!
ERROR: Couldn't build script 'C:/Program Files (x86)/Amnesia - The Dark Descent/redist/custom_stories/Testing/Maps/Chapter01/Testing2.hps'!
------- SCRIPT OUTPUT BEGIN --------------------------
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 6) : ERR : Expected ';'
ExecuteString (1, 6) : ERR : Expected ';'
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
ExecuteString (1, 2) : ERR : Expected expression value
//////////////////////////////////////////////////////////////////////////////////

PLEASE HELP.
Can someone please help. Anything will be useful
(This post was last modified: 03-24-2011, 01:15 AM by Itskody.)
03-24-2011, 12:38 AM
Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#2
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

No one knows anything?
03-24-2011, 04:55 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#3
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

Make an empty script, start amnesia and load the level that uses the script, then add part of the script you have a problem with, between each part you add reload the script and when you get an error you know what part causes it and it is easier to find the problem.
03-24-2011, 05:22 PM
Website Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#4
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

(03-24-2011, 05:22 PM)jens Wrote: Make an empty script, start amnesia and load the level that uses the script, then add part of the script you have a problem with, between each part you add reload the script and when you get an error you know what part causes it and it is easier to find the problem.

I dont understand what you mean. lol like go to the second maps .hps file and make an empty script? whats an empty script. haha sorry im script handicap.
03-24-2011, 05:55 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#5
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

make an empty script file for the second map like this:

void OnStart()
{
}

Then load the level in amnesia.

add some of the script like this:
void OnStart()
{
  AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
  AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
  AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
  AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
}

Reload the script, if it does not crash, then continue and add a bit more code:

void OnStart()
{
  AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
  AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
  AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
  AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
}

void UsedKeyOnCuboard(string &in asItem, string &in asEntity)
{
  AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
  AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
  AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
  AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
  SetSwingDoorLocked("cuboard_1", false, true);
  PlaySoundAtEntity("", "unlock_door", "cuboard_1", 0, false);
  RemoveItem("key_study_1");
}

and so on and on until it crashes, that way you can find out what part it is that is the problem and have less code to search for errors.
(This post was last modified: 03-24-2011, 06:25 PM by jens.)
03-24-2011, 06:25 PM
Website Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#6
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

(03-24-2011, 06:25 PM)jens Wrote: make an empty script file for the second map like this:

void OnStart()
{
}

Then load the level in amnesia.

add some of the script like this:
void OnStart()
{
  AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
  AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
  AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
  AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
}

Reload the script, if it does not crash, then continue and add a bit more code:

void OnStart()
{
  AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
  AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
  AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
  AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
}

void UsedKeyOnCuboard(string &in asItem, string &in asEntity)
{
  AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterWalk", true, 1);
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_245", 0, "");
  AddUseItemCallback("", "key_study_1", "cuboard_1", "UsedKeyOnCuboard", true);
  AddUseItemCallback("", "key_study_2", "mansion_2", "UsedKeyOnDoor", true);
  AddUseItemCallback("", "key_study_3", "mansion_4", "UsedKeyOnDoor2", true);
  SetSwingDoorLocked("cuboard_1", false, true);
  PlaySoundAtEntity("", "unlock_door", "cuboard_1", 0, false);
  RemoveItem("key_study_1");
}

and so on and on until it crashes, that way you can find out what part it is that is the problem and have less code to search for errors.

Thanks for that, uhm when i add

void MonsterWalk(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 15.0f, "");
GiveSanityDamage(10.0f, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
AddTimer("servant_grunt_1", 15.0f, "TimerMonster");
SetMessage("Journal, "OhGod", 5.0f);
}

It crashes, it works up until then. any ideas why?
03-24-2011, 08:53 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#7
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

SetMessage("Journal, "OhGod", 5.0f); is missing a " so it should be SetMessage("Journal", "OhGod", 5.0f);
03-24-2011, 09:45 PM
Website Find
Itskody Offline
Member

Posts: 100
Threads: 30
Joined: Mar 2011
Reputation: 1
#8
Solved: 8 Years, 8 Months, 3 Weeks ago RE: Custom Story isn't working

(03-24-2011, 09:45 PM)jens Wrote: SetMessage("Journal, "OhGod", 5.0f); is missing a " so it should be SetMessage("Journal", "OhGod", 5.0f);

Wow man ive went through so much trouble trying to fix this, all because of a quote, thanks it worked
03-24-2011, 10:18 PM
Find




Users browsing this thread: 2 Guest(s)