Frictional Games Forum (read-only)
Monster keeps disappearing - 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: Monster keeps disappearing (/thread-11132.html)

Pages: 1 2


Monster keeps disappearing - Sauron The King - 11-02-2011

Hello,

I'm making a custom story. When you come at a new area, a monster will spawn. He will keep patrolling around 30 pathnodes. But after a while he will just disappear. But if I follow him quietly and don't lose my eye on him, he won't dissappear, because than he will just keep following the Pathnodes.
How can I make the monster keep looping his patroll, so he will never stop or dissapear? (until I reach a certain area, but he will disappear already if I reach a certain area early).
I have pasted the part of the patrolling monster right down here. Who can help?

Code:
void OnEnter()
{
AddEntityCollideCallback("Player", "Monster_sleepingrooms", "Grunt_Sleepingrooms", true, 1);
}

void Grunt_Sleepingrooms(string &in asParent, string &in asChild, int alState)
{    
    SetEntityActive("Grunt_Sleepingrooms", true);
    PlayMusic("search_grunt.ogg", true, 2, 0, 1, true);
{for (int x = 0; x <= 4; x += 1)
{    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_1", 2, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_2", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_3", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_4", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_5", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_6", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_7", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_8", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_9", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_10", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_11", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_12", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_13", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_14", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_15", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_16", 2, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_17", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_18", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_19", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_20", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_21", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_22", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_23", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_24", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_25", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_26", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_27", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_28", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_29", 0, "");
    AddEnemyPatrolNode("Grunt_Sleepingrooms", "PathNodeArea_30", 4, "");
    }
}
}



RE: Monster keeps disappearing - Unearthlybrutal - 11-02-2011

I think that it disappears when it gets too far away from you


RE: Monster keeps disappearing - flamez3 - 11-02-2011

You have like 200 pathnodes so that he follows them Big Grin


RE: Monster keeps disappearing - Unearthlybrutal - 11-02-2011

... or the grunt just goes to sleepBig Grin...

okay, that wasn't a very good joke


RE: Monster keeps disappearing - Your Computer - 11-02-2011

Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance.



RE: Monster keeps disappearing - Unearthlybrutal - 11-02-2011

(11-02-2011, 03:12 PM)Your Computer Wrote: Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance.
" <Var Name="ActivationDistance" Value="40" /> "


This?


RE: Monster keeps disappearing - flamez3 - 11-02-2011

(11-02-2011, 03:38 PM)Unearthlybrutal Wrote:
(11-02-2011, 03:12 PM)Your Computer Wrote: Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance.
" "


This?


No i think he means using the Model Editor?


RE: Monster keeps disappearing - Sauron The King - 11-02-2011

Thank you guys, the problem is solved Smile
In Modeleditor just change this:
" <Var Name="ActivationDistance" Value="40" /> "
I've changed it to 9999, so it won't be disappearing again even if I went to Tokyo



RE: Monster keeps disappearing - Unearthlybrutal - 11-02-2011

(11-02-2011, 03:55 PM)flamez3 Wrote:
(11-02-2011, 03:38 PM)Unearthlybrutal Wrote:
(11-02-2011, 03:12 PM)Your Computer Wrote: Monsters automatically deactivate when the player is out of their activation distance. If you edit the monster, you can increase this distance.
" "


This?


No i think he means using the Model Editor?
It can be changed with both: editing the .ent file or with model editor
(11-02-2011, 07:08 PM)Sauron The King Wrote: Thank you guys, the problem is solved Smile
In Modeleditor just change this:
" "
I've changed it to 9999, so it won't be disappearing again even if I went to Tokyo


No problemSmile


RE: Monster keeps disappearing - palistov - 11-03-2011

Monsters will only deactivate if they are idle outside of the player's range. If you give them patrol routes they won't deactivate when out of range.