larslu 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 30 
	Threads: 15 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
Ending & credits 
			 
			
				How do you make credits of the game and automatically end it self when the credits are done?
			 
			
			
			
		 |  
	 
 | 
 
	| 03-22-2011, 08:43 PM  | 
	
		
	 | 
 
 
	
		
		Viperdream 
 
 
		
			Member 
			
			
			
 
			
	Posts: 124 
	Threads: 16 
	Joined: Jan 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
 Example:
 StartCredits("Outro..ogg", true, "Misc", "Credits", 2);
 
You will also need to create a new category in the .lang file for this:
 <CATEGORY Name="Misc"> 
<Entry Name="Credits">The most awesome person in the world made this map.</Entry> 
</CATEGORY>
 
Use [br] to start a new line.
 
The game ends itself automatically after the credits
			  
			
			
 
			
				
(This post was last modified: 03-22-2011, 08:49 PM by Viperdream.)
 
				
			 
		 |  
	 
 | 
 
	| 03-22-2011, 08:47 PM  | 
	
		
	 | 
 
 
	
		
		MrBigzy 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 616 
	Threads: 18 
	Joined: Mar 2011
	
 Reputation: 
8
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				void  StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum); 
 
I think it will end when the credits are done. I think you can end it without credits with the function StartDemoEnd(). 
 
Edit: Whoops, you beat me to it. D:
			 
			
			
			
				
(This post was last modified: 03-22-2011, 08:48 PM by MrBigzy.)
 
				
			 
		 |  
	 
 | 
 
	| 03-22-2011, 08:47 PM  | 
	
		
	 | 
 
 
	
		
		larslu 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 30 
	Threads: 15 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				 (03-22-2011, 08:47 PM)Viperdream Wrote:  StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
  Example: 
StartCredits("Outro..ogg", true, "Misc", "Credits", 2);
  
You will also need to create a new category in the .lang file for this: 
<CATEGORY Name="Misc"> 
<Entry Name="Credits">The most awesome person in the world made this map.</Entry> 
</CATEGORY>
  
Use [br] to start a new line. 
 
The game ends itself automatically after the credits 
I want to do when I come into a area the credits begins, how do I do that?
			  
			
			
			
		 |  
	 
 | 
 
	| 03-22-2011, 09:07 PM  | 
	
		
	 | 
 
 
	
		
		Tanshaydar 
 
 
		
			From Beyond 
			
			
			
 
			
	Posts: 3,085 
	Threads: 17 
	Joined: Mar 2009
	
 Reputation: 
67
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				Create a script area & add a collide call back. 
I have a feeling that this is someone we know, with a different account.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-22-2011, 09:14 PM  | 
	
		
	 | 
 
 
	
		
		Viperdream 
 
 
		
			Member 
			
			
			
 
			
	Posts: 124 
	Threads: 16 
	Joined: Jan 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				Some people just don't know where the search button is ^^
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-22-2011, 09:17 PM  | 
	
		
	 | 
 
 
	
		
		larslu 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 30 
	Threads: 15 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				 (03-22-2011, 09:14 PM)Tanshaydar Wrote:  Create a script area & add a collide call back. 
I have a feeling that this is someone we know, with a different account. 
Can you give me an example? I'm kinda new with this stuff.
			  
			
			
			
		 |  
	 
 | 
 
	| 03-22-2011, 09:35 PM  | 
	
		
	 | 
 
 
	
		
		Viperdream 
 
 
		
			Member 
			
			
			
 
			
	Posts: 124 
	Threads: 16 
	Joined: Jan 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Ending & credits 
			 
			
				Put this at: void OnStart() 
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
 Example:
 AddEntityCollideCallback("Player", "CreditsArea", "Collide_Credits", true, 1);
 
Then: (anywhere, just don't put it inside any {})
 void Collide_Credits(string &in asParent, string &in asChild, int alState)          
{ 
StartCredits("Outro..ogg", true, "Misc", "Credits", 2); 
}
 
You can learn all of this stuff on the wiki and with the search button though
			  
			
			
 
			
				
(This post was last modified: 03-22-2011, 09:45 PM by Viperdream.)
 
				
			 
		 |  
	 
 | 
 
	| 03-22-2011, 09:44 PM  | 
	
		
	 | 
 
 
	 
 |