Frictional Games Forum (read-only)

Full Version: Monster despawn
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've seen forums like this before but none have helped. Usually when a monster gets out of vision it disappears, but I want to make it so he doesn't disappear at all. I already got him to stay after death it's just when he's out of sight. Smile

Is there any way of doing this, and if so please explain 'cause I can be a noob at these kind of things! :S
Hey buddy I'm having the same problem over here.. It seems to be a common thing.

If you are REALLY a noob, you should post your script. If you find a solution (though scripting) I would be happy to fix it for you. I'll just stay tuned on this thread on the background.
I'm not sure what the script has to do with anything, considering that I didn't really try anything other than just place him. I'm completely clueless, but if you need the script, here ya go ;D

Quote: void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "Monster", false, 1);
}

void Monster(string &in asChild, string &in asParent, int alState)
{
SetEntityActive("brute_1", true);
AddEnemyPatrolNode("brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_4", 3, "");
AddEnemyPatrolNode("brute_1", "PathNodeArea_5", 0, "");
}
You should try reading this:
http://wiki.frictionalgames.com/hpl2/tut...rpathnodes

It states that the monster will despawn if it runs out of nodes, and the player isn't looking at it. There's a nice tutorial in there to make the monster move indefinitely.
You can edit the .ent file to change the distance when enemy is disappearing.
Hey, I've tested the editing of the .ent file (the grunt). I opened up the ModelEditor and then went to settings. Here, you can edit the behavior of the enemy (like awareness, search time etc.) Well, I've edited the search time, and set it from 10, to 200.

So far so good it works.
Okay thanks for the tips. Btw the nodes are a straight line and he already goes back and forth it's just when he's out of sight anyways I'll give that a try. Thanks!

(09-16-2012, 04:17 AM)Kreekakon Wrote: [ -> ]You should try reading this:
http://wiki.frictionalgames.com/hpl2/tut...rpathnodes

It states that the monster will despawn if it runs out of nodes, and the player isn't looking at it. There's a nice tutorial in there to make the monster move indefinitely.
Btw thanks, I read that before though and I have some trouble understanding "if" statements and what not so for my first story I would like to keep it simple. If I have to though then maybe I will! Smile