08-01-2011, 08:28 PM
After a monster has gone through all of it's pathnodes, will it disappear automatically?
And you'll be glad to know I'm this close |--| to completing the forth level (: Just gotta add little decor. tweaks like decals, furnature and storage decorations for that extra spice (;
Also, what's wrong with this script?
And you'll be glad to know I'm this close |--| to completing the forth level (: Just gotta add little decor. tweaks like decals, furnature and storage decorations for that extra spice (;
Also, what's wrong with this script?
Spoiler below!
Code:
void OnStart()
{
SetEntityPlayerInteractCallback("ScareDoor_1", "ScareDoorScript", true);
AddUseItemCallback("ToTheNextLevelDoor_1", "ToTheNextLevelDoorKey_1", "UsedKeyOnDoor", true);
SetEntityPlayerInteractCallback("BooDoor_1", "BooSpawn", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void ScareDoorScript(string &in asEntity)
{
AddPropImpulse("ScareDoor_1", 0, 0, 5, "World");
PlaySoundAtEntity("", "21_bang_door.snt", "ScareDoor_1", 0, false);
PlaySoundAtEntity("", "21_intro_scream.snt", ScareDoor_1", 0, false);
SetSwingDoorLocked("SacreDoor_1", false, true);
}
void BooSpawn(string &in asEntity)
{
SetEntityActive("MrBoo_1", true);
AddEnemyPatrolNode("MrBoo_1", "Node_1", 1, "");
AddEnemyPatrolNode("MrBoo_1", "Node_2", 1, "");
AddEnemyPatrolNode("MrBoo_1", "Node_3", 1, "");
AddEnemyPatrolNode("MrBoo_1", "Node_4", 2, "");
AddEnemyPatrolNode("MrBoo_1", "Node_5", 2, "");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("ToTheNextLevelDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", 0, false);
}