Frictional Games Forum (read-only)
Enemy respawn? - 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: Enemy respawn? (/thread-20465.html)

Pages: 1 2 3


RE: Enemy respawn? - OriginalUsername - 02-24-2013

Code:
void Monsterfunction(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("monster", -1);
AddTimer("", 0.1f, "monsterspawn");
}

void monsterspawn(string &in asTimer)
{
if(GetLocalVarInt("monster") == 0)
{
CheckPoint("checkpoint", "PlayerStartArea_2", "check", "Messages", "monsterhint");
SetMessage("Messages", "henrytalk4", 0);
SetEntityActive("floyd", true);
SetEntityActive("charles", true);
}
else
{
}
}

This might do it.
And you also have to change the true in addentitycollidecallback to false, so it wont delete itself


RE: Enemy respawn? - Kirbypwnage - 02-24-2013

(02-24-2013, 01:35 PM)Smoke Wrote:
Code:
void Monsterfunction(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("monster", -1);
AddTimer("", 0.1f, "monsterspawn");
}

void monsterspawn(string &in asTimer)
{
if(GetLocalVarInt("monster") == 0)
{
CheckPoint("checkpoint", "PlayerStartArea_2", "check", "Messages", "monsterhint");
SetMessage("Messages", "henrytalk4", 0);
SetEntityActive("floyd", true);
SetEntityActive("charles", true);
}
else
{
}
}

This might do it.
And you also have to change the true in addentitycollidecallback to false, so it wont delete itself

Okay, thanks! I'll test it later. Wink

EDIT: It worked! Thank you for your help, I appreciate it! Big Grin


RE: Enemy respawn? - OriginalUsername - 02-24-2013

(02-24-2013, 02:34 PM)Kirbypwnage Wrote:
(02-24-2013, 01:35 PM)Smoke Wrote:
Code:
void Monsterfunction(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("monster", -1);
AddTimer("", 0.1f, "monsterspawn");
}

void monsterspawn(string &in asTimer)
{
if(GetLocalVarInt("monster") == 0)
{
CheckPoint("checkpoint", "PlayerStartArea_2", "check", "Messages", "monsterhint");
SetMessage("Messages", "henrytalk4", 0);
SetEntityActive("floyd", true);
SetEntityActive("charles", true);
}
else
{
}
}

This might do it.
And you also have to change the true in addentitycollidecallback to false, so it wont delete itself

Okay, thanks! I'll test it later. Wink

EDIT: It worked! Thank you for your help, I appreciate it! Big Grin

You're welcome man Wink Glad I could help