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


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

com on! am i the only one who does not know how to make this?


RE: [ok not that Solved] How to make enemys patrol - Tanshaydar - 03-20-2011

Tried to see what's done in game's levels?


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

yes but just don't undersand how do they work, i found no forum entry nor web page about it, its like every one already knows how to make them patrol except me Sad


RE: [ok not that Solved] How to make enemys patrol - Tanshaydar - 03-20-2011

Is it really that hard? You place a node and attach it to an enemy.


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

ya but thats all i have heard. to place ONE node i don't realy know how to make a more complex path. for example i tried to make a area that wend collided by the player a enemy is spawn whit some pathnodes, he actualy works as i wanted IF i am not seen, but if he sees me its like he "forgets" the next nodes and only walks in the nodes he has already walk in to. and sometimes that means he will walk into a wall... and that is not what i want.

i have seen some custom stories and i have noticed that some have a file just for the path nodes but again i don't know how they work.


RE: [ok not that Solved] How to make enemys patrol - Pandemoneus - 03-20-2011

Those files are automatically created by the game, you only place the path nodes in the editor and script them in the hps file.


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

i don't want to be any near of being rude but i already know that but i just don't how to do it correctly. and plase if you are going to reply don't just say "add a path node" because i already know that too and that lead me to nowere. what i want to know is how do i make a enemy walk to the pathnodeA then pathnodeB, C, D etc... but i don't how because in the way i have done it it does not work well, has i have said before.


RE: [ok not that Solved] How to make enemys patrol - Viperdream - 03-20-2011

Just place path nodes, place them close enough together and then put this in the OnStart() or wherever you want him to move:
Code:
void OnStart()
{
AddEnemyPatrolNode("Tomcruise", "PatrolNode1", 0.0f, "flex.dae");//Animation isn't nesscesary, you can just leave it blank there (""). First one is the name of the monster, second is the node. You only have to add the 1 and the last node unless you want the monster to stop at every node, 3th is the amount of seconds he'll stay there and last one is the animation he will do when he is at that node. As I said, it isn't needed.
AddEnemyPatrolNode("Tomcruise", "PatrolNode50", 0.0f, "kiss.dae");
}



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

but thats what i have done =/ and they walk into walls like retardeds...
here is my code
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_4", "whatareyoudoinghere", true, 1);
}
void whatareyoudoinghere(string &in asParent, string &in asChild, int alState)
{    
    SetEntityActive("servant_asshole_1", true);
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_1",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_2",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_3",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_4",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_5",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_6",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_7",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_8",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_9",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_10",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_11",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_12",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_13",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_14",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_15",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_16",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_17",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_18",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_19",0,"");
    AddEnemyPatrolNode("servant_asshole_1","Assholespath_20",0,"");
}

so what is wrong?


RE: [ok not that Solved] How to make enemys patrol - Viperdream - 03-21-2011

Then that means your path nodes aren't close enough together.

Take a look at the official maps and see how close the nodes are together, that should give an idea on how to put them close enough together