Frictional Games Forum (read-only)
Monster stop at path node - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Monster stop at path node (/thread-8264.html)



Monster stop at path node - xtron - 05-26-2011

Code:
void OnStart()
{
AddEntityCollideCallback("monster_outside_door_slam1", "PathNodeArea_10", "disable_monster1", true, 1);
}

void disable_monster1(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("monster_outside_door_slam1", true);
}

Here's my current code for monster geting disabled when on "PathNodeArea_10" but it doesn't work. Any ides why?

Monster name: monster_outside_door_slam1
Node name: PathNodeArea_10



RE: Monster stop at path node - Khyrpa - 05-26-2011

change the node into a large script area and it should be okay?


RE: Monster stop at path node - Kyle - 05-26-2011

Yeah, what Khyrpa said.

Add a ScriptArea at PathNodeArea_10.

Code:
void OnStart()
{
     AddEntityCollideCallback("monster_outside_door_slam1", "ScriptArea_1", "disable_monster1", true, 1);
}
void disable_monster1(string &in asParent, string &in asChild, int alState)
{
     SetEnemyDisabled("monster_outside_door_slam1", true);
}



RE: Monster stop at path node - xtron - 05-26-2011

How do i do so the monster disapears when the player reaches another script?


EDIT: NVM! I figgured it out.

EDIT2:
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "script_make_monster_smoke1", "make_monster_smoke1", true, 1);
}

void make_monster_smoke1(string &in asParent, string &in asChild, int alState)
{
     FadeEnemyToSmoke("script_make_monster_smoke1", false);
}

Is this gonna work?


RE: Monster stop at path node - Khyrpa - 05-26-2011

oh... you have to make the boolean into true for the monster to fadetosmoke


RE: Monster stop at path node - xtron - 05-26-2011

(05-26-2011, 07:39 PM)Khyrpa Wrote: oh... you have to make the boolean into true for the monster to fadetosmoke

Oh I thought that "fadetosmoke" was that the sound "fadetosmoke" was gonna happen. But thanks ^^.


RE: Monster stop at path node - Khyrpa - 05-26-2011

ops... yes it actually is just for the sound! sorry... mybad keep it false if you dont want the sound