Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Black screen with Text as Intro
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#1
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. Smile
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 Heart

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
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#2
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
(This post was last modified: 02-26-2013, 07:45 AM by OriginalUsername.)
02-26-2013, 07:43 AM
Find
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#3
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 Sad
(This post was last modified: 02-26-2013, 11:31 AM by User01.)
02-26-2013, 11:26 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Black screen with Text as Intro

Something is wrong. The PlayMusic thing is not right. Use the command below on your .hps file.
PHP Code: (Select All)
PlayMusic("00_event_gallery.ogg"true1.0f0.0f0false); 
1.0f - Volume



In order to add the text, add the command below in your .hps file.
PHP Code: (Select All)
SetMessage("MessageCategory""MessageEntry"0); 

MessageCategory - 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."
(This post was last modified: 02-26-2013, 11:36 AM by PutraenusAlivius.)
02-26-2013, 11:35 AM
Find
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#5
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? Wink

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
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#6
RE: Black screen with Text as Intro

You need to create a category and an entry in your lang file;

Script File:

PHP Code: (Select All)
void OnStart()
{
    
FadeOut(0); //Instant fade
    
PlayMusic("00_event_gallery.ogg"true1.0f0.0f1true);
    
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:
PHP Code: (Select All)
<CATEGORY Name="Messages">
    <
Entry Name="SampleText">
        
Sample Text Here
    
</Entry>
</
CATEGORY

Creator of The Dark Treasure.
02-26-2013, 12:29 PM
Website Find
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#7
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:

PHP Code: (Select All)
void OnStart()
{
    
FadeOut(0); //Instant fade
    
PlayMusic("00_event_gallery.ogg"true1.0f0.0f1true);
    
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:
PHP Code: (Select All)
<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
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
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;

Script File:

PHP Code: (Select All)
void OnStart()
{
    
FadeOut(0); //Instant fade
    
PlayMusic("00_event_gallery.ogg"true1.0f0.0f1true);
    
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:
PHP Code: (Select All)
<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
PHP Code: (Select All)
void OnStart()
{
    
FadeOut(0);
    
PlayMusic("00_event_gallery.ogg"true1.0f0.0f1true);
    
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.
PHP Code: (Select All)
void OnEnter()
{
    
PlayMusic("00_event_gallery.ogg"true1.0f0.0f1true);

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
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#9
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

PHP Code: (Select All)
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"true1.0f0.0f1true);  // plays the music every time the player enters the map


In Ruins [WIP]
02-27-2013, 07:24 AM
Find




Users browsing this thread: 1 Guest(s)