Dutton 
 
 
		
			Member 
			
			
			
 
			
	Posts: 121 
	Threads: 3 
	Joined: Apr 2012
	
 Reputation: 
2
		
	 | 
	
		
			
Grunt Animations 
			 
			
				So today i got a bit curious after reading a post on the forums, and decided to make a small test map. containing a corridor with a metal table and a resized cabinet. 
 
Now what is supposed to happend is that i pickup a key and a grunt will spawn with disabled triggers. and it should play an animation when reaching the first pathnode, which was "run.anm". 
 
Here is my hps file: 
 
 
 
void OnStart() 
{ 
SetEntityCallbackFunc("activategrunt", "startgruntrun");  
} 
 
void startgruntrun(string &in asEntity, string &in type)  
{ 
	SetEnemyDisableTriggers("servant_grunt_1", true); 
	SetEntityActive("servant_grunt_1", true);  
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "run.anm"); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "notice1.anm"); 
} 
 
The animations are included at the end of the pathnodes as described on the tutorial page "Setting up a monster". 
 
But the animations won't play, how come?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-03-2012, 10:51 AM  | 
	
		
	 | 
 
 
	
		
		zombiehacker595 
 
 
		
			Member 
			
			
			
 
			
	Posts: 141 
	Threads: 51 
	Joined: Mar 2012
	
 Reputation: 
3
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				 (04-03-2012, 10:51 AM)Dutton Wrote:  So today i got a bit curious after reading a post on the forums, and decided to make a small test map. containing a corridor with a metal table and a resized cabinet.  
 
Now what is supposed to happend is that i pickup a key and a grunt will spawn with disabled triggers. and it should play an animation when reaching the first pathnode, which was "run.anm".  
 
Here is my hps file:  
 
 
 
void OnStart()  
{  
SetEntityCallbackFunc("activategrunt", "startgruntrun");  
}  
 
void startgruntrun(string &in asEntity, string &in type)  
{  
SetEnemyDisableTriggers("servant_grunt_1", true);  
SetEntityActive("servant_grunt_1", true);  
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "run.anm");  
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "notice1.anm");  
}  
 
The animations are included at the end of the pathnodes as described on the tutorial page "Setting up a monster".  
 
But the animations won't play, how come?  
wait so do you just want him to spawn when you pick up ibject then he runs at you?
			  
			
			
			
		 |  
	 
 | 
 
	| 04-03-2012, 12:23 PM  | 
	
		
	 | 
 
 
	
		
		Dutton 
 
 
		
			Member 
			
			
			
 
			
	Posts: 121 
	Threads: 3 
	Joined: Apr 2012
	
 Reputation: 
2
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				 (04-03-2012, 12:23 PM)zombiehacker595 Wrote:  wait so do you just want him to spawn when you pick up ibject then he runs at you?  
Nope, when he spawns on the item pickup he should be running from the first PatrolNode to the other. he isn't supposed to attack anyone just run from 1 point to another.
 
EDIT: Problem is that as a standard he just walks from point to point, but i want him to be running, if it's even possible?
			  
			
			
 
			
				
(This post was last modified: 04-03-2012, 04:35 PM by Dutton.)
 
				
			 
		 |  
	 
 | 
 
	| 04-03-2012, 04:33 PM  | 
	
		
	 | 
 
 
	
		
		RedMser 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 40 
	Threads: 12 
	Joined: Mar 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				Remove the extension. In the script of justine they also used an animation, this is their script: 
 
 
AddEnemyPatrolNode("enemy_suitor_4", "PathNodeArea_30", 10.0f, "IdleExtra1"); 
 
You see the animation has no extension. That is your problem.
			 
			
			
			
		 |  
	 
 | 
 
	| 04-03-2012, 06:43 PM  | 
	
		
	 | 
 
 
	
		
		Obliviator27 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 792 
	Threads: 10 
	Joined: Jul 2011
	
 Reputation: 
66
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				From what I can tell, you want him to run. For that, you'll have to edit his .ent file and play with the runspeeds and accelerations so that he goes into "Run" state much faster. 
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-03-2012, 07:46 PM  | 
	
		
	 | 
 
 
	
		
		Statyk 
 
 
		
			Schrödinger's Mod 
			
			
			
 
			
	Posts: 4,390 
	Threads: 72 
	Joined: Sep 2011
	
 Reputation: 
241
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				If not have the extension doesn't fix it, try putting the extension "run.dae_anim".. 
 
Just a thought =\
			 
			
			
			
		 |  
	 
 | 
 
	| 04-03-2012, 08:37 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				The assumption is the thought that the animation parameter will actually do something in practice. Even if we were to assume that the animation at the patrol node feature is implemented, there are still the many animation conditions that the game goes through with the monster, which are listed in the model editor for the grunt type, which could conflict with the desired animation at the patrol node. 
 
In other words, if you want the entity of grunt type to force the run animation, you'll have to edit the walking speeds, possibly the acceleration speeds, walk-to-run speed, etc, of the entity.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-03-2012, 08:44 PM  | 
	
		
	 | 
 
 
	
		
		Dutton 
 
 
		
			Member 
			
			
			
 
			
	Posts: 121 
	Threads: 3 
	Joined: Apr 2012
	
 Reputation: 
2
		
	 | 
	
		
			
RE: Grunt Animations 
			 
			
				So to make the grunt run from 1 node to another i need to edit its .ent file? there is simply no other way?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 04-04-2012, 11:38 AM  | 
	
		
	 | 
 
 
	 
 |