RE: Script problem! 
			 
			
				Well I have this proplem with this script at the start it works fine but at the end... 
 
 
void OnStart() 
{ 
CheckPoint ("player", "GoToPrison_1", "WakeUp", "Hints", "HintUn");   <-Works 
	StopMusic(2, 0);   <-Works 
PlayMusic("06_amb.ogg", true, 0.7, 5, 0, false);   <-Works 
	AddEntityCollideCallback("Player", "HuntStart_1", "Hunt_Monster", true, 1); 
	AddUseItemCallback("", "crowbar_1", "prison_1","UseCrowbarOnDoor", true);  
	AddUseItemCallback("", "Cyrle_Wood_1", "safety_large_vert_1","OpenBigDoor1", true); 
	AddEntityCollideCallback("crowbar_joint_1", "BreakDoor", "CollideAreaBreakDoor", true, 1); 
} 
THIS Part DOES NOT WORK!!HELP!!!! 
void Endstart_1(string &in asParent, string &in asChild, int alState) 
{ 
AddTimer("Endstart_timer_1", 0.2, "Endstart_timer_1_End"); 
} 
void Endstart_timer_1_End(string &in asTimer) 
{ 
SetEntityActive("servant_grunt_1", false); 
SetEntityActive("servant_grunt_2", false); 
SetEntityActive("castle_gate_arched01_1", true); 
SetEntityActive("castle_gate_arched01_open_1", false); 
	PlaySoundAtEntity("","close_gate", "castle_gate_arched01_1", 0, false); 
	StopMusic(2, 0); 
PlayMusic("29_amb_end_soft.ogg", true, 0.7, 5, 0, false); 
} 
 
void Endclose_2(string &in asParent, string &in asChild, int alState) 
{ 
AddTimer("Endclose_timer_2", 0.2, "Endclose_timer_2_End"); 
} 
void Endclose_timer_2_End(string &in asTimer) 
{ 
   StartCredits("29_event_end.ogg", false, "End", "Credits", 1); 
} 
void GruntFind(string &in asParent, string &in asChild, int alState) 
{ 
ShowEnemyPlayerPosition("servant_grunt_1"); 
ShowEnemyPlayerPosition("servant_grunt_2"); 
} 
 
void Hunt_Monster(string &in asParent, string &in asChild, int alState) 
{ 
ShowEnemyPlayerPosition("servant_brute_1"); 
	SetSwingDoorClosed("mansion_1", false,false); 
StopMusic(2, 0); 
SetEntityActive("servant_brute_1", true); 
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0.1, ""); 
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.1, ""); 
GiveSanityDamage(5, true); 
		PlayGuiSound("react_scare", 1.0f); 
PlayMusic("08_amb.ogg", true, 0.7, 5, 1, false); 
 
} 
void WakeUp(string &in asName, int alCount) 
{ 
	AddEntityCollideCallback("player", "Try_escape_1", "GruntFind", true, 1); 
	AddEntityCollideCallback("player", "End_start_1", "Endstart_1", true, 1); 
	AddEntityCollideCallback("player", "End_end_1", "Endclose_2", true, 1); 
StopMusic(2, 0); 
StopMusic(2, 1); 
PlayMusic("Diablo_II_Caves.ogg", true, 0.7, 5, 0, false); 
	RemoveItem("lantern_1"); 
} 
void UseCrowbarOnDoor(string &in asItem, string &in asEntity) 
{ 
	AddTimer(asEntity, 0.2, "TimerSwitchShovel"); 
	PlaySoundAtEntity("pickupcrow","player_crouch.snt", "Player", 0.05, false); 
	RemoveItem("crowbar_1"); 
} 
void TimerSwitchShovel(string &in asTimer) 
{ 
	PlaySoundAtEntity("attachshovel","puzzle_place_jar.snt", "Player", 0, false); 
 
	SetEntityActive("crowbar_joint_1", true); 
} 
void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState) 
{ 
	GiveSanityBoostSmall(); 
 
 
	SetSwingDoorLocked("prison_1", false, false); 
	SetSwingDoorDisableAutoClose("prison_1", true); 
	SetSwingDoorClosed("prison_1", false,false); 
 
	PlaySoundAtEntity("","break_wood_metal", "prison_1", 0, false); 
	AddPropImpulse("prison_1", 0, -3, 0, "world"); 
 
	SetEntityActive("crowbar_joint_1", false); 
	SetEntityActive("crowbar_dyn_1", true); 
} 
void TimerPushDoor(string &in asTimer) 
{ 
	AddPropImpulse("prison_1", -1, -4, 2, "world"); 
	AddTimer("doorclose", 1.1, "TimerDoorCanClose"); 
} 
 
void TimerDoorCanClose(string &in asTimer) 
{ 
	SetSwingDoorDisableAutoClose("prison_1", false); 
} 
void OpenBigDoor1(string &in asItem, string &in asEntity) 
{ 
ConnectEntities("","elevator_lever_1","safety_large_vert_1", true, -1, "OpenBigdoor"); 
	AddUseItemCallback("", "Cyrle_Wood_1", "safety_large_vert_1","OpenBigDoor2", true); 
	PlaySoundAtEntity("safety_large_vert_1","crank_old_stuck.snt", "Player", 0, false); 
	RemoveItem("Cyrle_Wood_1"); 
} 
void OpenBigdoor(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState) 
{ 
	SetEntityActive("servant_grunt_1", true); 
AddEnemyPatrolNode("servant_grunt_1", "Cell_Guard_Path_4", 0.1, ""); 
AddEnemyPatrolNode("servant_grunt_1", "Cell_Guard_Path_3", 0.1, ""); 
	SetEntityActive("servant_grunt_2", true); 
AddEnemyPatrolNode("servant_grunt_2", "Cell_Guard_Path_2", 0.1, ""); 
AddEnemyPatrolNode("servant_grunt_2", "Cell_Guard_Path_3", 0.1, ""); 
SetSwingDoorClosed("safety_large_vert_1", false, true); 
SetLeverStuckState("elevator_lever_1", -1, true); 
SetMessage("Hints", "HintEscape", 10.0f); 
}
			 
			
			
			
		 |