Angerpull 
			Member0  
	
		
			
Why doesnt this script work!? 
 
				Hey can anyone tell me what's wrong with my script? I want a grunt to spawn and walk against a path, but no matter what I do it will not work.
Spoiler below!  
 void OnStart()
 
 
			
				
(This post was last modified: 07-09-2011, 12:50 AM by Angerpull .) 
 
				
			 
		 
 
 
	07-08-2011, 10:59 PM  
		
	 
 
	
		Zypherzemus 
			Member0  
	
		
			
RE: I see no Problems!? 
 
				 (07-08-2011, 10:59 PM) Angerpull Wrote:  
Spoiler below!  
 void OnStart()
 
 
Does the enemy even become active? As in, does it actually spawn?
I personally think that the "CreateEntityAtArea" command works better than the "SetEntityActive" command. That's just me though, first off, does the map even load?
			
 
			
			
			
		 
 
 
	07-08-2011, 11:12 PM  
		
	 
 
	
		Angerpull 
			Member0  
	
		
			
RE: I see no Problems!? 
 
				 (07-08-2011, 11:12 PM) Snuffalofagus Wrote:   (07-08-2011, 10:59 PM) Angerpull Wrote:  
Spoiler below!  
 void OnStart()
 
 
Yes the map loads, how could I know if the script worked or not? But I see no problems with my script.
			
 
			
			
			
		 
 
 
	07-08-2011, 11:50 PM  
		
	 
 
	
		Zypherzemus 
			Member0  
	
		
			
RE: I see no Problems!? 
 
				I'm not so sure about the path nodes but for the entity to spawn, try this:
In the level editor, create an enemy area (i think thats the name of the type of area) where you want it to spawn, then in the .hps file add this
void OnStart()
"SpawnArea" is the name of what you named the area, it doesn't have to be "SpawnArea"
P.S. If there is no area named "EnemyArea" or whatever in the level editor, just use a regular "ScriptArea"
			
 
 
 
	07-09-2011, 12:57 AM  
		
	 
 
	
		Angerpull 
			Member0  
	
		
			
RE: I see no Problems!? 
 
				 (07-09-2011, 12:57 AM) Snuffalofagus Wrote:  void OnStart()
I like to use the Activate Entity better.
But here's my Script.
Spoiler below!  
 void OnStart()
 
 
Now let me explain. Z1 = The Grunt that is Spawning. ZP Is the Script AREA. Can you tell me what is wrong?
			
 
			
			
			
		 
 
 
	07-09-2011, 01:24 AM