39Games 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 48 
	Threads: 14 
	Joined: Jan 2013
	
 Reputation: 
0
		
	 | 
	
		
			
Keep enemies after death? 
			 
			
				What would be the code to make an enemy spawn after player death? It was in amnesia campaign but I do not remember what levels it was used in 
Cheers
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-07-2013, 02:32 PM  | 
	
		
	 | 
 
 
	
		
		No Author 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 962 
	Threads: 10 
	Joined: Jun 2012
	
 Reputation: 
13
		
	 | 
	
		
			
RE: Keep enemies after death? 
			 
			
				Use this : 
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); 
 
Sets a checkpoint at which the player will respawn in case he dies. 
 
Callback syntax: void MyFunc(string &in asName, int alCount)  
 
Count is 0 on the first checkpoint load!  
 
asName - the internal name 
asStartPos - the name of the StartPos in the editor 
asCallback - the function to call when the player dies/respawns 
asDeathHintCat - the category of the death hint message to be used in the .lang file 
asDeathHintEntry - the entry in the .lang file
			 
			
			
 
			
				
(This post was last modified: 03-07-2013, 02:39 PM by No Author.)
 
				
			 
		 |  
	 
 | 
 
	| 03-07-2013, 02:37 PM  | 
	
		
	 | 
 
 
	
		
		39Games 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 48 
	Threads: 14 
	Joined: Jan 2013
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Keep enemies after death? 
			 
			
				 (03-07-2013, 02:37 PM)No Author Wrote:  Use this : 
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); 
 
Sets a checkpoint at which the player will respawn in case he dies. 
 
Callback syntax: void MyFunc(string &in asName, int alCount)  
 
Count is 0 on the first checkpoint load!  
 
asName - the internal name 
asStartPos - the name of the StartPos in the editor 
asCallback - the function to call when the player dies/respawns 
asDeathHintCat - the category of the death hint message to be used in the .lang file 
asDeathHintEntry - the entry in the .lang file Thanks, but I need a little more info, does the first code go in OnStart? do i need that setplayercallback code? where does what go? 
Cheers.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 03-07-2013, 02:53 PM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: Keep enemies after death? 
			 
			
				 (03-07-2013, 02:53 PM)39Gamer Wrote:   (03-07-2013, 02:37 PM)No Author Wrote:  Use this : 
void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); 
 
Sets a checkpoint at which the player will respawn in case he dies. 
 
Callback syntax: void MyFunc(string &in asName, int alCount)  
 
Count is 0 on the first checkpoint load!  
 
asName - the internal name 
asStartPos - the name of the StartPos in the editor 
asCallback - the function to call when the player dies/respawns 
asDeathHintCat - the category of the death hint message to be used in the .lang file 
asDeathHintEntry - the entry in the .lang file Thanks, but I need a little more info, does the first code go in OnStart? do i need that setplayercallback code? where does what go? 
Cheers. Here is a code that i found in the dark depths of the development support section.
 void OnStart() { CheckPoint("", "PLAYERSTARTAREA", "CALLBACKFUNC", "", ""); }
  void CALLBACKFUNC(string &in asName, int alCount) {                //////////Your scripts. } 
 
  
			 
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 03-07-2013, 03:03 PM  | 
	
		
	 | 
 
 
	 
 |