Frictional Games Forum (read-only)
How do i make monster despawn after pathnodes - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How do i make monster despawn after pathnodes (/thread-16026.html)



How do i make monster despawn after pathnodes - Putkimato - 06-10-2012

Code:
void morzo(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute", true);
AddEnemyPatrolNode("brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_8", 0, "");
SetMessage("Warnings", "Hide_1", 0);
}

How do i make monster dissapear after this?


RE: How do i make monster despawn after pathnodes - FlawlessHappiness - 06-10-2012

Make a script area around the last pathnode and make it

void OnStart()
{
AddEntityCollideCallback("brute", "ScriptArea_1", "OnBruteCollide_1", true, 1);
}

void OnBruteCollide_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute", false);
}