Quotentote 
 
 
		
			Member 
			
			
			
 
			
	Posts: 118 
	Threads: 23 
	Joined: Dec 2011
	
 Reputation: 
11
		
	 | 
	
		
			
enemy path nodes 
			 
			
				hi there i trying to do this: 
an enemy spawns nearby the player (disabled triggers) and i want him to patrol around a statue.
 
what happens:
 
enemy spawns doing some *roooaaaar* and...nothing....just a lazy splashy =(
 
anyone know why he dont wanna go?   
			 
			
			
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:10 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				Did you add the patrol nodes to the monster?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:14 PM  | 
	
		
	 | 
 
 
	
		
		Quotentote 
 
 
		
			Member 
			
			
			
 
			
	Posts: 118 
	Threads: 23 
	Joined: Dec 2011
	
 Reputation: 
11
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				yea ofc, every single one....but he dont want to move... :/ 
			 
			
			
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:14 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				Is the monster spawned by script or was it pre-placed in the level editor?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:17 PM  | 
	
		
	 | 
 
 
	
		
		Quotentote 
 
 
		
			Member 
			
			
			
 
			
	Posts: 118 
	Threads: 23 
	Joined: Dec 2011
	
 Reputation: 
11
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				pre-placed in lvl editor, inactive. activated by script 
			 
			
			
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:18 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				Can we see the script and possibly a screenshot of the patrol nodes? Does the hpl.log provide any insight?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:22 PM  | 
	
		
	 | 
 
 
	
		
		Quotentote 
 
 
		
			Member 
			
			
			
 
			
	Posts: 118 
	Threads: 23 
	Joined: Dec 2011
	
 Reputation: 
11
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				void OnStart() { AddEntityCollideCallback("Player", "armorfall_area", "armorfallsdown", true, 1); } void armorfallsdown(string &in asParent, string &in asChild, int alState)     {         AddPropImpulse("armor_01", -3.0f, 0.0f, 0.0f, "world");         StartScreenShake(0.3, 0.5, 2, 0.8);         PlaySoundAtEntity("", "explosion.snt", "roll_2", 0, false);         SetEntityActive("armor_001", false);         SetEntityActive("armor_002", false);         SetEntityActive("armor_003", false);         SetEntityActive("r1", true);         SetEntityActive("r2", true);         SetEntityActive("r3", true);         SetEntityActive("r5", true);         SetEntityActive("r6", true);         SetEntityActive("a1", true);         SetEntityActive("a2", true);         SetEntityActive("a3", true);         SetEntityActive("a4", true);         SetEntityActive("a5", true);         SetEntityActive("a6", true);         SetEntityActive("a7", true);         AddTimer("", 1.5, "TimerRock1");             SetPropHealth("door_valve_open", 0.0f);         SetEntityActive("DestroyBoxGate", true);         SetEntityActive("waterlurker_1", true);                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_1", 2, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_2", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_3", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_4", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_5", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_6", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_7", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_8", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_9", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_10", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_11", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_12", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_13", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_14", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_15", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_16", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_17", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_18", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_19", 0, "");                   AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_20", 0, "");     } 
 
  
http://img198.imageshack.us/img198/9037/...nntrop.jpg 
			 
			
			
			
				
(This post was last modified: 02-02-2012, 04:26 PM by Quotentote.)
 
				
			 
		 |  
	 
 | 
 
	| 02-02-2012, 04:25 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				I don't think waterlurkers are designed to follow patrol nodes.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:42 PM  | 
	
		
	 | 
 
 
	
		
		Quotentote 
 
 
		
			Member 
			
			
			
 
			
	Posts: 118 
	Threads: 23 
	Joined: Dec 2011
	
 Reputation: 
11
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				argh x( ok....then i have to find another ways, thanks anyways   
			 
			
			
			
		 |  
	 
 | 
 
	| 02-02-2012, 04:43 PM  | 
	
		
	 | 
 
 
	
		
		palistov 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,208 
	Threads: 67 
	Joined: Mar 2011
	
 Reputation: 
57
		
	 | 
	
		
			
RE: enemy path nodes 
			 
			
				They can't be assigned a patrol path, but they still need patrol nodes to navigate. If you're feeling creative, try creating a silent sound file in Audacity or a similar program. Export into ogg vorbis format, and set up a .snt file for it. Modify the properties so it has a large range and has a decent volume. Since it is silent the player won't hear anything, but you can trigger this sound where you want the lurker to go. Lurkers respond exclusively to sounds and the player coming within a certain height distance.  
If triggering the sound via doesn't work, then the only other option is a full conversion to create a custom material, or somehow convincing players to overwrite their default materials.cfg with an additional custom material with silent physics sounds -- this way you can spawn a small custom box and give it a powerful body impulse to have it collide with a wall, thus alerting and luring the lurker away.
  
Now if that is not unconventional enough for you, you can also lure the lurker into a certain path with food. Create a body part entity in your map. Name it "bait_1". Make it small and static, so the player won't notice it or move it. Create a script area around it called "bait_area_1". Do this multiple times, making sure to keep the index at the end the same. Then copy this script into your map  while you have it open in Amnesia -- I did not bugtest this.
 
Also, I'm not entirely this will work! But it's fun to experiment right??
 ////////////////////////////////////// //    QUOTENTOTE LURKER BAIT
  //change this to however many bait points you have const int NUM_BAIT=2; void OnStart() {     for(int i=1;i<=NUM_BAIT;i++) AddEntityCollideCallback("LURKERNAMEHERE", "bait_area_"+i, "LurkerBaitCollide", 1, false); }
  void LurkerBaitCollide(string &in p, string &in c, int s) {     int temp=parseStringINT(c);     SetEntityActive("bait_"+temp, false);     if(temp==NUM_BAIT) temp=1;     else temp++;     SetEntityActive("bait_"+temp, true); }
 
  ////////////////////////////////////// //    PARSING FXNs
  int parseStringINT(string str) {     int output = 0;     for(int i=0; i<str.length(); i++)      {       int digit = getDigit(str[i]);       if(digit > -1) output = 10*output+digit;       }     return output; }
  int getDigit(uint8 digit) {     int d = digit-48; //48 is ASCII code for 0     return ((d >= 0)&&(d<=9)) ? d : -1; } 
 
 
If that works out, the lurker should follow the paths sequentially (goes to 1, goes to 2, etc). Also -- change "LURKERNAMEHERE" to whatever your water lurker's internal name is and make sure you make the bait script areas decently large so the lurker doesn't manage to eat the food   
 
I created large cylindrical collision indicators which you can use in place of a script area -- since the areas are square they won't be as consistent in terms of timing. If you want to use these collision indicators instead let me know and I'll upload the entity file here and modify the script.
			  
			
			
 
			
				
(This post was last modified: 02-02-2012, 06:02 PM by palistov.)
 
				
			 
		 |  
	 
 | 
 
	| 02-02-2012, 05:41 PM  | 
	
		
	 | 
 
 
	 
 |