TheFallenAngel 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 2 
	Threads: 1 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
how to make an enemy appear after a trigger? 
			 
			
				i am new at scripting so please tell me how :3
			 
			
			
			
		 |  
	 
 | 
 
	| 03-23-2011, 09:44 AM  | 
	
		
	 | 
 
 
	
		
		Raymond 
 
 
		
			Member 
			
			
			
 
			
	Posts: 126 
	Threads: 24 
	Joined: Feb 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: how to make an enemy appear after a trigger? 
			 
			
				Here is the link:  http://www.frictionalgames.com/forum/thread-5117.html
If you don't know how, i can give an example.
 First: 
AddEntityCollideCallback("Player" , "AREA NAME" , "ANY NAME YOU LIKE" , true , 1);
  
Second: 
 
void Example(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("servant_grunt_1", true); 
}
 
Hope it helped   .
 
Edit: Sorry this is off-topic. But i think you're new to this forum. You only posted 1 time. Well anyways. If you need help you can tell me or Tanshaydar. Tanshaydar is an expert but i'm not but you can still ask me. I'll try my best   .
			  
			
			
 
One World To Another [DEMO] coming soon. 
			
				
(This post was last modified: 03-23-2011, 09:49 AM by Raymond.)
 
				
			 
		 |  
	 
 | 
 
	| 03-23-2011, 09:47 AM  | 
	
		
	 | 
 
 
	
		
		TheFallenAngel 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 2 
	Threads: 1 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: how to make an enemy appear after a trigger? 
			 
			
				 (03-23-2011, 09:47 AM)Raymond Wrote:  Here is the link: http://www.frictionalgames.com/forum/thread-5117.html 
 
If you don't know how, i can give an example. 
 
First: 
AddEntityCollideCallback("Player" , "AREA NAME" , "ANY NAME YOU LIKE" , true , 1);
  
Second: 
 
void Example(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("servant_grunt_1", true); 
}
  
Hope it helped  . 
 
Edit: Sorry this is off-topic. But i think you're new to this forum. You only posted 1 time. Well anyways. If you need help you can tell me or Tanshaydar. Tanshaydar is an expert but i'm not but you can still ask me. I'll try my best  . 
aww thanks    .
			  
			
			
			
		 |  
	 
 | 
 
	| 03-23-2011, 11:58 AM  | 
	
		
	 | 
 
 
	
		
		Raymond 
 
 
		
			Member 
			
			
			
 
			
	Posts: 126 
	Threads: 24 
	Joined: Feb 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: how to make an enemy appear after a trigger? 
			 
			
				This is a forum and everyone could see it. I am getting embarrassed right now   .
			  
			
			
 
One World To Another [DEMO] coming soon. 
			
		 |  
	 
 | 
 
	| 03-23-2011, 12:01 PM  | 
	
		
	 | 
 
 
	
		
		Crypto 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 14 
	Threads: 4 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: how to make an enemy appear after a trigger? 
			 
			
				I am also new at scripting.So i have done this much 
 
//////////////////////////// 
// Run when entering map 
void OnEnter() 
{ 
    AddUseItemCallback("", "key_tomb_1", "castle_2", "KeyOnDoor", true);  
} 
  
void KeyOnDoor(string &in asItem, string &in asEntity) 
{ 
    SetSwingDoorLocked("castle_2", false, true); 
    PlaySoundAtEntity("", "unlock_door.snt", "castle_2", 0.0f, true);  
void OnStart() 
{ 
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1); 
} 
void MonsterFunc1(string &in asParent , string &in asChild , int alState) 
{ 
SetEntityActive("servant_grunt" , true); 
} 
 
But this comes up when i launch the map 
 : FATAL ERROR: Could not load script file 
'custom_stories/maps/custom_storiest/maps/maps/MansionEscape.hps 
'! 
main (19,2) : ERR : Unexpected end of file. anyone has idea whats wrong with this ?
			 
			
			
			
		 |  
	 
 | 
 
	| 03-23-2011, 11:24 PM  | 
	
		
	 | 
 
 
	
		
		MrBigzy 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 616 
	Threads: 18 
	Joined: Mar 2011
	
 Reputation: 
8
		
	 | 
	
		
			
RE: how to make an enemy appear after a trigger? 
			 
			
				Add a } after PlaySoundAtEntity line.
			 
			
			
			
		 |  
	 
 | 
 
	| 03-24-2011, 12:16 AM  | 
	
		
	 | 
 
 
	
		
		Crypto 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 14 
	Threads: 4 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: how to make an enemy appear after a trigger? 
			 
			
				Thanks alot MrBigzy !!
			 
			
			
			
		 |  
	 
 | 
 
	| 03-24-2011, 02:31 PM  | 
	
		
	 | 
 
 
	 
 |