| 
		
	
		| User01   Member
 
 Posts: 97
 Threads: 30
 Joined: Feb 2013
 Reputation: 
0
 | 
			| Black screen with Text as Intro 
 
				Hello, first of all my english is really noit perfect but I will hope that you can understand me well and please make your answers understandable, thanks.   
I was lookin at frictionalgames.com but really it didnt help me because I'm a total beginner on making a Custom Story + my english sucks a bit lol. What I want is: Before you can controll the player, I want to make an Intro (black screen) and there should blend some white texts. And after that, I can play the game. How is it possible? Please explain everything I need to do and where to put the script. Thanks in advantage    
 
Edit: Oh and maybe want to put music in the intro too
			
				
(This post was last modified: 03-23-2013, 02:05 AM by plutomaniac.)
 |  |  
	| 02-26-2013, 01:10 AM |  |  
	
		| OriginalUsername   Posting Freak
 
 Posts: 896
 Threads: 42
 Joined: Feb 2013
 Reputation: 
34
 | 
			| RE: Black screen with Text as Intro 
 
				Use FadeOut(0,001f); so the screen will fade out so fast, the player won't notice it. Then use FadeIn(2); to let it fade in again. 
For the music: PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
 PlayMusic("The name of the music file", (if it should loop, true or false), (The volume of the music, usually 1), (Time until the music hits full volume), (priority, usually 1), (if it should continue after a StopMusic(); is used. if false, the track will be restarted));
You can find music in the amnesia redist or /program files/steam/steamapps/common/amnesia TDD/music (steam) folder. 
Good luck!
 
Edit: for more help with commands: use this |  |  
	| 02-26-2013, 07:43 AM |  |  
	
		| User01   Member
 
 Posts: 97
 Threads: 30
 Joined: Feb 2013
 Reputation: 
0
 | 
			| RE: Black screen with Text as Intro 
 
				Hi, 
for first i just used any music for example 00_event_gallery.ogg
 
so here i copy the code i used: 
{	 
FadeOut(0,001f); 
PlayMusic("00_event_gallery", (false), (1), (0.5), (1), (no(); false)); 
 FadeIn(2); 
 }
 
then when i start the game there will come a fatal error. please make a sample for me. and also i still dont know how to add text yet   
				
(This post was last modified: 02-26-2013, 11:31 AM by User01.)
 |  |  
	| 02-26-2013, 11:26 AM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Black screen with Text as Intro 
 
				Something is wrong. The PlayMusic thing is not right. Use the command below on your .hps file. 1.0fPlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 0, false); 
 - Volume
 
 
In order to add the text, add the command below in your .hps file.
 MessageCategorySetMessage("MessageCategory", "MessageEntry", 0); 
 - The text's category on the extra_english.lang file.
MessageEntry  - The text's entry on the extra_english.lang file.
 
Hope it helps. Also if you're confused, i could give you the full script.
			
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 02-26-2013, 11:35 AM |  |  
	
		| User01   Member
 
 Posts: 97
 Threads: 30
 Joined: Feb 2013
 Reputation: 
0
 | 
			| RE: Black screen with Text as Intro 
 
				I will try it now (I will let you know if I works then), but please give me the full script now to get sure okay?    
Edit: 
No doesn't work. Also I dont know what to put in extra english. 
Thats the script i have so far: 
{	 
FadeOut(0,001f); 
PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 0, false); 
SetMessage("?", "?", 0); 
FadeIn(2); 
}
			
				
(This post was last modified: 02-26-2013, 11:49 AM by User01.)
 |  |  
	| 02-26-2013, 11:43 AM |  |  
	
		| Linus Ågren   Senior Member
 
 Posts: 309
 Threads: 58
 Joined: Jan 2011
 Reputation: 
5
 | 
			| RE: Black screen with Text as Intro 
 
				You need to create a category and an entry in your lang file; 
Script File:
 void OnStart(){
 FadeOut(0); //Instant fade
 PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 1, true);
 SetMessage("Messages", "SampleText", 2.0f); //Will display the message in the category Messages within the entry SampleText for 2.0 seconds.
 FadeIn(2);
 }
 
Lang file:
 <CATEGORY Name="Messages"><Entry Name="SampleText">
 Sample Text Here
 </Entry>
 </CATEGORY>
 
 Creator of The Dark Treasure. |  |  
	| 02-26-2013, 12:29 PM |  |  
	
		| User01   Member
 
 Posts: 97
 Threads: 30
 Joined: Feb 2013
 Reputation: 
0
 | 
			| RE: Black screen with Text as Intro 
 
				 (02-26-2013, 12:29 PM)junkfood2121 Wrote:  You need to create a category and an entry in your lang file;
 Script File:
 
 
 void OnStart(){
 FadeOut(0); //Instant fade
 PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 1, true);
 SetMessage("Messages", "SampleText", 2.0f); //Will display the message in the category Messages within the entry SampleText for 2.0 seconds.
 FadeIn(2);
 }
 
Lang file:
 
 <CATEGORY Name="Messages"><Entry Name="SampleText">
 Sample Text Here
 </Entry>
 </CATEGORY>
 
 Yes it works, thanks but it now the screen fades directly in the game and then the text comes, I want to have it that the screen keeps black for some seconds, its the moment where the message should come and then after it, it should fade in to the game
 
like:  
> black screen 
> message fade in 
> message fades out 
> game fades in
 
edit: Another mistake. When i press the start and go back to the game, the music will play again
			 
				
(This post was last modified: 02-26-2013, 07:46 PM by User01.)
 |  |  
	| 02-26-2013, 07:17 PM |  |  
	
		| PutraenusAlivius   Posting Freak
 
 Posts: 4,713
 Threads: 75
 Joined: Dec 2012
 Reputation: 
119
 | 
			| RE: Black screen with Text as Intro 
 
				 (02-26-2013, 07:17 PM)User01 Wrote:   (02-26-2013, 12:29 PM)junkfood2121 Wrote:  You need to create a category and an entry in your lang file;Yes it works, thanks but it now the screen fades directly in the game and then the text comes, I want to have it that the screen keeps black for some seconds, its the moment where the message should come and then after it, it should fade in to the game
 Script File:
 
 
 void OnStart(){
 FadeOut(0); //Instant fade
 PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 1, true);
 SetMessage("Messages", "SampleText", 2.0f); //Will display the message in the category Messages within the entry SampleText for 2.0 seconds.
 FadeIn(2);
 }
 
Lang file:
 
 <CATEGORY Name="Messages"><Entry Name="SampleText">
 Sample Text Here
 </Entry>
 </CATEGORY>
 
 
 like:
 > black screen
 > message fade in
 > message fades out
 > game fades in
 
 edit: Another mistake. When i press the start and go back to the game, the music will play again
 void OnStart(){
 FadeOut(0);
 PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 1, true);
 SetMessage("Messages", "SampleText", 2.0f);
 FadeIn(2);
 }
 
Experiment with the FadeOut and FadeIn until you got the message that you want. 
As for the music thing, use the script below.
 void OnEnter(){
 PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 1, true);
 }
 
So that, whenever you enter the map, the music plays.
			 
 "Veni, vidi, vici.""I came, I saw, I conquered."
 |  |  
	| 02-27-2013, 06:51 AM |  |  
	
		| NaxEla   Senior Member
 
 Posts: 415
 Threads: 5
 Joined: Dec 2012
 Reputation: 
28
 | 
			| RE: Black screen with Text as Intro 
 
				 (02-26-2013, 07:17 PM)User01 Wrote:  Yes it works, thanks but it now the screen fades directly in the game and then the text comes, I want to have it that the screen keeps black for some seconds, its the moment where the message should come and then after it, it should fade in to the game
 like:
 > black screen
 > message fade in
 > message fades out
 > game fades in
 
 edit: Another mistake. When i press the start and go back to the game, the music will play again
 void OnStart(){
 FadeOut(0);  // instant fade
 SetMessage("Category", "Entry", 3.0f);  // will show the message for 3 seconds
 AddTimer("", 3.0f, "DoFadeIn");  // will execute the DoFadeIn function after 3 seconds
 }
 
 void DoFadeIn(string &in asTimer)
 {
 FadeIn(2.0f);  // fades in over a period of 2 seconds
 }
 
 void OnEnter()
 {
 PlayMusic("00_event_gallery.ogg", true, 1.0f, 0.0f, 1, true);  // plays the music every time the player enters the map
 }
 
 
 |  |  
	| 02-27-2013, 07:24 AM |  |  |