(01-04-2015, 07:06 PM)DnALANGE Wrote: OR.. Just add a timer..
Fadeout 3 seconds then after 3.5 seconds orso add a timr called
EndCredits for example and execute the script there?
I Always do it like that ..
what am i suppose to do with the door cause everytime i enter the level door it gives me an error, of course i have made no hps file for the level door that ends my demo. and i don't have a map made for for the level door cause i tried that once and it just loads me into the the 5th level.
this is very frustrating for me and weid cause i have never made an end nor have i used startcredits or demoend.
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 EndDemo(string &in asTimer)
{
FadeOut(3.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()
{
AddTimer("", 3, "EndDemo");
}