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 slow Probaly code Help
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#1
Custom story slow Probaly code Help

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: (Select All)
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);

(This post was last modified: 06-27-2012, 07:54 PM by Steve.)
06-26-2012, 09:55 PM
Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#2
RE: Custom story goes very slow help

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.

06-27-2012, 01:35 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Custom story slow Probaly code Help

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/amn...erformance

Tutorials: From Noob to Pro
06-27-2012, 03:44 AM
Website Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#4
RE: Custom story goes very slow help

Fixed it Smile (no idea how)
(This post was last modified: 06-27-2012, 07:53 PM by Steve.)
06-27-2012, 04:21 PM
Find




Users browsing this thread: 1 Guest(s)