Frictional Games Forum (read-only)
Custom story slow Probaly code Help - 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: Custom story slow Probaly code Help (/thread-16521.html)



Custom story slow Probaly code Help - Steve - 06-26-2012

Hello since I've changed my map it all went slow Sad
first a huge pile of stuff exploded. I seem (think) to fixed that but still my game is going very slow this only happen in my mod. It's going so slow it's as good as not playable it's moving like frame for frame please help.
this is my .hps file
PHP Code:
void OnStart(){
 
AddUseItemCallback("""Dungeonkey_1""Storage_1""UsedKeyOnDoor"true);
 
AddUseItemCallback("""Rustkey""DungeonDoor""Ultra"true);
 
AddUseItemCallback("""Bar""Breakable""BreakableWall"true);
 
AddUseItemCallback("""Tinder""Keybody_1""Body"true);
}
void Body(string &in asItemstring &in asEntity)
{
 
PlayMusic("19_drill.ogg"false0.70.110false);
 
SetEntityActive("Keybody_1"false);
 
SetEntityActive("Keybody_2"true);
 
SetEntityActive("Rustkey"true);
}
void BreakableWall(string &in asItemstring &in asEntity)
{
 
SetEntityActive("Breakable"false);
 
SetEntityActive("Broken"true);
 
SetEntityActive("Rock_1"true);
 
SetEntityActive("Rock_2"true);
 
SetEntityActive("Rock_3"true);
 
SetEntityActive("Rock_5"true);
 
SetEntityActive("Rock_6"true);
 
SetEntityActive("Rock_7"true);
 
RemoveItem("Bar");
}
void Ultra(string &in asItemstring &in asEntity)
{
SetLevelDoorLocked("DungeonDoor"false);
PlaySoundAtEntity("""unlock_door""DungeonDoor"0false);
RemoveItem("RustKey");
void UsedKeyOnDoor(string &in asItemstring &in asEntity)

 
SetSwingDoorLocked("Storage_1"falsetrue);
 
PlaySoundAtEntity("""unlock_door""Storage_1"0false);
 
RemoveItem("Dungeonkey_1");
}
void OnEnter()
{
 
SetEntityPlayerInteractCallback("Dungeonkey_1""ActivateMonster"true);
 
SetEntityPlayerInteractCallback("Tinder""Spawn"true);
 
SetEntityPlayerInteractCallback("Rustkey""Super"true);
}
void Spawn(string &in asEntity)
{
 
SetEntityActive("Corpse"true);
 
SetEntityActive("Slime1"true);
 
SetEntityActive("Slime2"true);
 
SetEntityActive("Slime3"true);
 
SetEntityActive("Slime4"true);
 
SetEntityActive("Slime5"true);
 
SetEntityActive("Slime6"true);
 
SetEntityActive("Slime7"true);
 
SetEntityActive("Slime8"true);
 
SetEntityActive("Slime9"true);
 
SetEntityActive("Slime10"true);
 
AddTimer("Scare"0.1f"Scare1");
}
void Scare1(string &in asTimer)
{
 
GiveSanityDamage(10true);
 
PlaySoundAtEntity("""react_scare.snt""Player"0false);
}
void ActivateMonster(string &in item)
{
 
SetEntityActive("Steve_1"true);
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_1"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_2"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_3"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_4"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_5"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_6"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_7"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_8"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_9"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_10"0"Idle");
 
AddEnemyPatrolNode("Steve_1""PathNodeArea_11"0"Idle");
}
void Super(string &in item)
{
 
SetEntityActive("Drill"true);




RE: Custom story goes very slow help - GrAVit - 06-27-2012

I'm just going to guess that some entities you've placed are colliding inside something else which causes massive lag and might end up destroying things ending up in explosion sounds.


RE: Custom story slow Probaly code Help - Your Computer - 06-27-2012

A script like that wouldn't slow down the performance of the game. Not sure what you did in your map, but you may want to read this: http://wiki.frictionalgames.com/hpl2/amnesia/performance


RE: Custom story goes very slow help - Steve - 06-27-2012

Fixed it Smile (no idea how)