Frictional Games Forum (read-only)
Stupid monster... - 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: Stupid monster... (/thread-9138.html)

Pages: 1 2


Stupid monster... - christopher231 - 07-14-2011

Hey.
i made this small water part in my level and added a water lurker, but it has to be stupid and it gets stuck on things...
so i wanted to add some path nodes for it to follow so it doesn't get stuck, i found the code for it, but i dont know how to make it follow more then one and continue its rounds.
can some one help me with this one.


RE: Stupid monster... - waqas12346 - 07-14-2011

Try using this:-
Code:
AddEnemyPatrolNode("NameOfTheEnemy", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("NameOfTheEnemy", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("NameOfTheEnemy", "PathNodeArea_3", 0, "");

- NameOfTheEnemy= Put a name of the enemy that you have in level editor. Smile
- PathNodeArea= Make sure that you added pathnode close to the others. Sometimes they get stuck and blind Tongue. If your pathnode is up then Enemy may roll round and round like a Dumb. Big Grin


RE: Stupid monster... - palistov - 07-14-2011

From my experience, water lurkers don't patrol like grunts do. They just sit still and wait for their prey. To avoid your creepy little fishy friend getting stuck, you need to add patrol nodes at its level around your map. These will help the AI navigate said fishy friend around things like rocks, walls, pipes, corners, etc.

Place them with the area tool (press 8) and make sure they're 1-2.5 meters apart. Any further seems to break the link between the nodes, and the monster won't travel between unliked nodes.

In your debug menu, activate the entity info option. While an enemy is active, you'll see the patrol nodes and their linked edge nodes, allowing you to judge whether the monsters path will make sense.

Good look schooling those water lurkers. Smile


RE: Stupid monster... - christopher231 - 07-14-2011

ok cool thanks Big Grin
i got an idea tonight where you walk down a hallway and a monster appears in front of you and runs at you and goes in to spoke when it comes near you.
I know these codes for me to use.

void ShowEnemyPlayerPosition(string& asName);
Makes the enemy run to the player, no matter where he is.

void SetEnemyIsHallucination(string& asName, bool abX);
Makes an enemy a hallucination. Hallucinations fade to smoke when they get near the player.

but i don't know what code I use to make the monster appear when i want it to.
void SetEnemyDisabled(string& asName, bool abDisabled); is it this one !?!?!?!


RE: Stupid monster... - palistov - 07-14-2011

SetEntityActive(string &in name, bool disabled);

Use this function to control entities such as monsters


RE: Stupid monster... - Hardarm - 07-14-2011

Just don't use ShowEnemyPlayerPosition. If it spawns right in front of you he anyways see you, And if he doesnt see you anymore he will search. Just add LOTS of pathnodes in the map, A LOT. EVERYWHERE. then you add a patrol node in the HPS and he will reach your position just by going through all these pathnodes you placed Wink

That makes your life easier and makes the enemy more smart and patrolling everywhere.


RE: Stupid monster... - christopher231 - 07-14-2011

i just found out with the grunt he has a box to tick next to hallucination!
does that mean i don't need to use the hallucination code ?


RE: Stupid monster... - Roenlond - 07-14-2011

(07-14-2011, 04:35 PM)christopher231 Wrote: i just found out with the grunt he has a box to tick next to hallucination!
does that mean i don't need to use the hallucination code ?

Yes. Neither do you need to disable triggers if you check the other box. (Monster will never notice you if it's checked)


RE: Stupid monster... - christopher231 - 07-16-2011

How do i get a monster to appear after i pick up a note ?
This would be helpful, and if you can, can you link me to a vid about it Big Grin


RE: Stupid monster... - palistov - 07-16-2011

Add a callback function for the note:

void OnStart() { SetEntityCallbackFunc("yournote", "NoteCallback"); }


void NoteCallback(string &in entity, string &in type)
{
if(type == "OnPickup") { //do cool stuff here }
}