Frictional Games Forum (read-only)
[ok not that Solved] How to make enemys patrol - 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: [ok not that Solved] How to make enemys patrol (/thread-6873.html)

Pages: 1 2 3


[ok not that Solved] How to make enemys patrol - Danny Boy - 03-13-2011

Hi hmm does eny one knows how to make a grunt or brute to patrol? i have read many stuff mentioning it but i don't know how to use them =/

btw iff you also know how to make a monster to spawn wend i open a door or cabinet that would be awsome Big Grin

[EDIT] ok i am realy not happy about my patrol monster -_- if he doesn't see me it works just fine but iff i does see me he beaves like some pathnodes do not exist if you want to see that youself downloa my testmap in the showcas its called super alpha

heres the code if it helps you

void PickupKey(string &in entity)
{
PlayMusic("11_event_dog", false, 5, 5, 10, true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_1",0,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_2",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_3",10,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_4",0,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_5",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_6",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_7",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_8",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_9",4,"");
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_10",4,"");

}
}
}

}

}
}
}
}
}
}


RE: How to make enemys patrol - Viperdream - 03-13-2011

For the patrolling thing? You can just do this:
AddEnemyPatrolNode("tai_1", "PathNodeArea_1", 10000.0f, "IdleExtra3");

But then he just stands there and I don't think that's what you are looking for :<
Anyway, if the player is close enough. Then he will return to his first path node after reaching the last one though.
You could try something with that.

For the spawn, do this:
SetEntityPlayerInteractCallback("cabinet", "monsterspawn", true);

The cabinet is the entity the player has to interact with to activate the function. "monsterspawn" is the function.
And then add a script for the function
void monsterspawn(string &in entity)
{
SetEntityActive("monster", true);
}


RE: How to make enemys patrol - Danny Boy - 03-13-2011

Hey the spawn thing works! thank you

although the the patrol thingy its not like i wanted =/

but still thank you... Btw... how can i make a door open? i know how to close them and lock them... but i don't know how to open =/


RE: [still unsolved] How to make enemys patrol - Viperdream - 03-13-2011

SetSwingDoorClosed("door", false, true);

"door" is the entity, false means that the door will open and not close, and the last true means that it has effects.

Same goes to unlock them.
SetSwingDoorLocked("door", false, true);


RE: [still unsolved] How to make enemys patrol - Danny Boy - 03-13-2011

Thank you very much!

you will be in the "thanks to:" section of my custom's story end credits ^_^


RE: [still unsolved] How to make enemys patrol - Viperdream - 03-13-2011

Yay Big Grin


RE: [still unsolved] How to make enemys patrol - Danny Boy - 03-16-2011

Waaa i still can't make Mr. face to patrol xC i have done a patrol node and he looks too glishy is animation looks very odd.... and he sometimes desapears! please some one explain to me how to make them patrol... or tell me were i can learn it.


RE: [still unsolved] How to make enemys patrol - Hooumeri - 03-16-2011

Did you use path or pos nodes? Please include that section of the script here.


RE: [still unsolved] How to make enemys patrol - Danny Boy - 03-16-2011

i have used the path ones... but never mind i figure it out by my self.


RE: [ok not that Solved] How to make enemys patrol - Danny Boy - 03-19-2011

help me please Sad