drunkmonk 
 
 
		
			Member 
			
			
			
 
			
	Posts: 109 
	Threads: 7 
	Joined: Jun 2012
	
 Reputation: 
4
		
	 | 
	
		
			
RE: How to get Grunt to open cabinet doors 
			 
			
				Ok first in the level editor you have to go to areas, and when you click on the drop down menu for area types you should see pathnode near the bottem. Place these where you want your grunt to walk leading up to the cabinet, (you don't have to have a path node inside the cabinet)then in the void OnStart() you can add a timer like this AddTimer("", 1.0, MonsterPath); for example. Then make a void MonsterPath(string &in asTimer) above the void monster_opendoor(string &in asParent, string &in asChild, int alState) you don't have to put it here but this is just for example. In the void MonsterPath(string &in asTimer) add this 
AddEnemyPatrolNode("Grunt1", "PathNodeArea1", ""); 
keep adding these for the other path nodes you have placed and make sure the number at the end matchs the path node you want your monster to go to next. 
You will also need a script area to put infront of the cabinet (you can find this area in the same drop down menu you were in earlier) and name monster_opendoor_area (just as in the script) and what I mean by playing around with the AddImpulse settings is depending which way your cabinet is faceing you may have to change the numbers around based on the direction. The first number represents the X axis, the second number is the Y axis, and the third number is the Z axis.
			 
			
			
			
		 |  
	 
 | 
	| 06-22-2012, 05:57 PM  | 
	
		
	 |