Patrolling issue
I'm trying to make this brute walk around the map. He does walk about but for some reason, he pauses at each one before moving on to the next one.
Here is the script in full
////////////////////////////
// Run when entering map
void OnEnter()
{
FadeOut(0);
FadeIn(25);
AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Cheapscare", "Boom", true, 0);
AddEntityCollideCallback("Player", "PlayerCollide", "SpawnMonster", true, 0);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("monsterdoorkey_1");
}
void Boom(string &in asParent, string &in asChild, int alstate)
{
SetEntityActive("armournice", true);
PlayGuiSound("12_girl_scream.snt", 1);
GiveSanityDamage(80 , true);
}
void SpawnMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
PlayGuiSound("amb_idle01.snt", 1);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_41", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_42", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_43", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_44", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_45", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_46", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_47", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_48", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_49", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_50", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_51", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_52", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_53", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_54", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_55", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_56", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_57", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_58", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_59", 0, "");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Can anyone resolve this issue?
(This post was last modified: 04-30-2012, 07:57 PM by Manbearpig116.)
|