Hailfiretank 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 33 
	Threads: 12 
	Joined: Jun 2012
	
 Reputation: 
0
		
	 | 
	
		
			
Spawn Monster upon entering Area 
			 
			
				Me again... 
 
Basically, I want to spawn a monster when the player enters a certain area. 
eg. Upon entering area Monster_Spawn, I want a brute (named 'Brute') to spawn. 
 
What is the script to do this? 
 
Thanks!
			 
			
			
			
		 |  
	 
 | 
 
	| 03-05-2013, 01:59 PM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: Spawn Monster upon entering Area 
			 
			
				void OnStart() {     AddEntityCollideCallback("Player", "Monster_Spawn", "MyFunc", true, 1); }
  void MyFunc(string &in asParent, string &in asChild, int alState) {     SetEntityActive("Brute", true); } 
 
  
			 
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 03-05-2013, 02:28 PM  | 
	
		
	 | 
 
 
	
		
		Nice 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 3,812 
	Threads: 37 
	Joined: Jan 2012
	
 Reputation: 
153
		
	 | 
	
		
			
RE: Spawn Monster upon entering Area 
			 
			
				void AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates); 
 
^ when player enters area 
 
 
SetEntityActive(string& asName, bool abActive); 
 
^ to spawn the monster.. for example  
SetEntityActive("Brute", true);
			 
			
			
 
 
    Sorry but we cannot change your avatar as the new avatar you specified is too big. The maximum dimensions are 80x80 (width x height) 
 
			
				
(This post was last modified: 03-05-2013, 02:29 PM by Nice.)
 
				
			 
		 |  
	 
 | 
 
	| 03-05-2013, 02:29 PM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: Spawn Monster upon entering Area 
			 
			
				 (03-05-2013, 02:29 PM)DogFood Wrote:  void AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates); 
 
^ when player enters area 
 
 
SetEntityActive(string& asName, bool abActive); 
 
^ to spawn the monster.. for example  
SetEntityActive("Brute", true); 
Ninja'd you, DogFood. I was here first.
			  
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 03-05-2013, 02:31 PM  | 
	
		
	 | 
 
 
	
		
		Hailfiretank 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 33 
	Threads: 12 
	Joined: Jun 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Spawn Monster upon entering Area 
			 
			
				Thanks so much guys!     
Edit: What's the script for despawning a monster?   
			 
			
			
			
				
(This post was last modified: 03-05-2013, 10:11 PM by Hailfiretank.)
 
				
			 
		 |  
	 
 | 
 
	| 03-05-2013, 09:19 PM  | 
	
		
	 | 
 
 
	
		
		darksky 
 
 
		
			Member 
			
			
			
 
			
	Posts: 52 
	Threads: 8 
	Joined: Nov 2012
	
 Reputation: 
2
		
	 | 
	
		
			
RE: Spawn Monster upon entering Area 
			 
			
			
			
			
				
(This post was last modified: 03-05-2013, 10:23 PM by darksky.)
 
				
			 
		 |  
	 
 | 
 
	| 03-05-2013, 10:23 PM  | 
	
		
	 | 
 
 
	 
 |