(01-05-2015, 10:02 AM)Julius Caesar Wrote:  Try using an InteractCallback to initiate the credits rather than using OnLeave.
void OnStart()
{
     
     AddEntityCollideCallback("Player", "Sutior_1", "AreaCollide", true, 1);
 
      PlayMusic("18_amb", true, 5, 2.0, 4, true);
	  
	 AddEntityCollideCallback("Player", "Script_1", "ActivateStatue", true, 1);
	 
	  AddEntityCollideCallback("Player", "PlaySound", "Sound", true, 1);
	  
	 AddUseItemCallback("", "Storage", "StorageDoor", "UseKey", true);
	 
	  AddEntityCollideCallback("Player", "ActivateDoor", "DoorAppear", true, 1);
	  
	 AddEntityCollideCallback("Player", "QuestArea", "AddQuest", true, 1);
	   
}
 void AddQuest(string &in asParent, string &in asChild, int alState) 
{
     AddQuest("QuestArea", "Add");
}
  void Move(string &in asEntity, int alState) 
{
        if (GetLocalVarInt("check") == 0)
	    {
                if (alState == 1)
                {
	               SetMoveObjectState("ShelfRotate_1", 1.0f);
		 
	                 PlaySoundAtEntity("", "quest_completed.snt", "ShelfRotate_1", 0, false);
		    
		           PlayMusic("01_puzzle_passage", false,  3, 0, 10, false);
		 
		             SetLocalVarInt("check", 1);
		 
		           GiveSanityBoost();
		 
		             return;
	            }
	    }	 	 
}
  void DemoEnd(string &in asEntity)
{
    AddTimer("Credits", 3, "EndDemo");
	
     FadeOut(5.2);
	 
	StartCredits("ending_daniel", true, "Levels", "EndDemoCreits", 3);
	 
}
  void UseKey(string &in asItem, string &in asEntity)
{
      SetSwingDoorLocked("StorageDoor", false, true);
       PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
	   
	  RemoveItem("Storage");
}
  void DoorAppear(string &in asParent, string &in asChild, int alState) 
{
      SetEntityActive("StorageDoor", true);
}
  void ActivateStatue(string &in asParent, string &in asChild, int alState) 
{
     SetEntityActive("CreepyStatue", true);
    
	  PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0.0, false);
	  
}
  void AreaCollide(string &in asParent, string &in asChild, int alState)
{
 SetEntityActive("Sutior", true);
	 
	 AddEnemyPatrolNode("Sutior", "Node_1", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_5", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_6", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_8", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_10", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_16", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_20", 0.001, "");
	 AddEnemyPatrolNode("Sutior", "Node_26", 0.001, "");
}
   
   
   
void OnEnter()
{
     
}
void OnLeave()
{
   
}
------------------------------------------------------------------------------------------------------
This is my fixed script/hps file.