| 
		
	
		| Danny Boy   Posting Freak
 
 Posts: 2,718
 Threads: 85
 Joined: Mar 2011
 Reputation: 
81
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				com on! am i the only one who does not know how to make this?
			 |  |  
	| 03-20-2011, 05:17 PM |  |  
	
		| Tanshaydar   From Beyond
 
 Posts: 3,085
 Threads: 17
 Joined: Mar 2009
 Reputation: 
67
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				Tried to see what's done in game's levels?
			 
 |  |  
	| 03-20-2011, 05:40 PM |  |  
	
		| Danny Boy   Posting Freak
 
 Posts: 2,718
 Threads: 85
 Joined: Mar 2011
 Reputation: 
81
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				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    |  |  
	| 03-20-2011, 06:11 PM |  |  
	
		| Tanshaydar   From Beyond
 
 Posts: 3,085
 Threads: 17
 Joined: Mar 2009
 Reputation: 
67
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				Is it really that hard? You place a node and attach it to an enemy.
			 
 |  |  
	| 03-20-2011, 09:04 PM |  |  
	
		| Danny Boy   Posting Freak
 
 Posts: 2,718
 Threads: 85
 Joined: Mar 2011
 Reputation: 
81
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				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.
 
				
(This post was last modified: 03-20-2011, 10:09 PM by Danny Boy.)
 |  |  
	| 03-20-2011, 10:08 PM |  |  
	
		| Pandemoneus   Senior Member
 
 Posts: 328
 Threads: 2
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				Those files are automatically created by the game, you only place the path nodes in the editor and script them in the hps file.
			 
 |  |  
	| 03-20-2011, 11:25 PM |  |  
	
		| Danny Boy   Posting Freak
 
 Posts: 2,718
 Threads: 85
 Joined: Mar 2011
 Reputation: 
81
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				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.
			 
				
(This post was last modified: 03-20-2011, 11:39 PM by Danny Boy.)
 |  |  
	| 03-20-2011, 11:38 PM |  |  
	
		| Viperdream   Member
 
 Posts: 124
 Threads: 16
 Joined: Jan 2011
 Reputation: 
0
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				Just place path nodes, place them close enough together and then put this in the OnStart() or wherever you want him to move: 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");
 }
 
				
(This post was last modified: 03-20-2011, 11:45 PM by Viperdream.)
 |  |  
	| 03-20-2011, 11:45 PM |  |  
	
		| Danny Boy   Posting Freak
 
 Posts: 2,718
 Threads: 85
 Joined: Mar 2011
 Reputation: 
81
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				but thats what i have done =/ and they walk into walls like retardeds... 
here is my 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?
			 |  |  
	| 03-20-2011, 11:52 PM |  |  
	
		| Viperdream   Member
 
 Posts: 124
 Threads: 16
 Joined: Jan 2011
 Reputation: 
0
 | 
			| RE: [ok not that Solved]  How to make enemys patrol 
 
				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
 
 |  |  
	| 03-21-2011, 12:00 AM |  |  |