(01-01-2015, 06:06 AM)Mudbill Wrote: Run the script called StartCredits. Very straight forward.
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);
}
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);
}
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()
{
StartDemoEnd();
StartCredits("29_end_amb_soft", true, "Levels", "EndDemoCreits", 2);
}
like this?