Frictional Games Forum (read-only)

Full Version: How Do i fade in/out
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Im trying to get my custom story to fade out before the credits roll, but i cant seem to get it working. Is this right?
PHP Code:
void EndGame(string &in asParentstring &in asChildint alState)
{
    
FadeOut(0.0f);
    
FadeIn(4.0f);
    
PlayGuiSound("player_bodyfall.snt"5.0f);
    
AddTimer(""7.0f"Win");
}

void Win(string &in asTimer)
{
    
StartCredits("player_darkness.snt"true"Journal""Over"1);


All i want to do is fade out, but idk what to do.
Sadly, you can't have FadeIn and FadeOut under the same function. Make a timer for four seconds and FadeIn
(04-06-2011, 10:10 AM)Russ Money Wrote: [ -> ]Sadly, you can't have FadeIn and FadeOut under the same function. Make a timer for four seconds and FadeIn

ok thanks, i got it nowSmile i dont feel like making ANOTHER post, so do you think you can help me with loading times, like how to get a picture on the loading screen and possibly say something other than loading....? if not ill just make another topic.
In your extra_english.lang file, (or whichever language you're working in) make a new Category and add this.
Code:
<CATEGORY Name="LoadingText">
<Entry Name="NAME_OF_ENTRY"> ENTRY TEXT HERE </Entry>
</CATEGORY>

You can use <br> for breaks (starting a new line) when editing .lang file.

Then, in your script.
Code:
SetupLoadScreen(string &asTextCat, string &asTextEntry, int alRandomNum, string &asImageFile);

string &asTextCat - The category, which is "LoadingText"
string &asTextEntry - the "NAME_OF_ENTRY"
int alRandomNum - I believe if you have numbered NAME_OF_ENTRY names, it'll choose a random one. I normally have it as 0
string &asImageFile - Inside your custom story root folder, make subfolders which will lead to "YOUR CUSTOM STORY"\graphics\general, in there you can put .jpgs to call as your loading backgrounds.

If you want anymore help on this or anything else, add me to Steam and you can feel free to PM me.
(04-06-2011, 10:24 AM)Russ Money Wrote: [ -> ]In your extra_english.lang file, (or whichever language you're working in) make a new Category and add this.
Code:
<CATEGORY Name="LoadingText">
<Entry Name="NAME_OF_ENTRY"> ENTRY TEXT HERE </Entry>
</CATEGORY>

You can use <br> for breaks (starting a new line) when editing .lang file.

Then, in your script.
Code:
SetupLoadScreen(string &asTextCat, string &asTextEntry, int alRandomNum, string &asImageFile);

string &asTextCat - The category, which is "LoadingText"
string &asTextEntry - the "NAME_OF_ENTRY"
int alRandomNum - I believe if you have numbered NAME_OF_ENTRY names, it'll choose a random one. I normally have it as 0
string &asImageFile - Inside your custom story root folder, make subfolders which will lead to "YOUR CUSTOM STORY"\graphics\general, in there you can put .jpgs to call as your loading backgrounds.

If you want anymore help on this or anything else, add me to Steam and you can feel free to PM me.

I have no games on steam so cant add you. and does the SetupLoadScreen get put in the hps file? and how do i seperate 1 loading screen from another.
Yeah, in the .hps
Here's my .lang file, to give you an example.
Code:
<CATEGORY Name="LoadingText">
<Entry Name="letter">Writing of a site in South Africa made my skin crawl with goosebumps[br]and my heart race.[br]"remembered as the ones who saved humanity from all illness, all disorders."</Entry>
<Entry Name="plane">I expected the trees and bugs, but I didn't expect the plane's engine to fail.[br][br]I can only remember waking up hours later alone...</Entry>
</CATEGORY>

And the .hps
Code:
void OnStart()
{
FadeOut(1.0);
SetupLoadScreen("LoadingText", "letter", 0, "letter.jpg");
ChangeMap("intro_office.map", "intro", "", "");
}

To change them, just setup another SetupLoadScreen func.
(04-06-2011, 11:46 AM)Russ Money Wrote: [ -> ]Yeah, in the .hps
Here's my .lang file, to give you an example.
Code:
<CATEGORY Name="LoadingText">
<Entry Name="letter">Writing of a site in South Africa made my skin crawl with goosebumps[br]and my heart race.[br]"remembered as the ones who saved humanity from all illness, all disorders."</Entry>
<Entry Name="plane">I expected the trees and bugs, but I didn't expect the plane's engine to fail.[br][br]I can only remember waking up hours later alone...</Entry>
</CATEGORY>

And the .hps
Code:
void OnStart()
{
FadeOut(1.0);
SetupLoadScreen("LoadingText", "letter", 0, "letter.jpg");
ChangeMap("intro_office.map", "intro", "", "");
}

To change them, just setup another SetupLoadScreen func.

Alright thanks i got it, but when i load up a map, the picture or anything i wrote didnt show up, they only show up if i leave the room and re enter, i tried putting the SetupLoadinScreen both on void OnStart and void OnEnter but either way it either only loads the first time, or doesnt load the first time but loads the second, how can i make it load both? hopefully that makes sense
If you're talking about changing the loading screen, the only way I can describe it is the face-shield crying blood tears, I don't believe that can be done without a full conversion mod. And I have no idea how to do that at this moment.

But the load screens change whenever you have them changing. If it's OnStart of your first map, it's going to only show the load screen once you leave.

Otherwise, I'm not too sure what you're saying.
(04-06-2011, 12:10 PM)Russ Money Wrote: [ -> ]If you're talking about changing the loading screen, the only way I can describe it is the face-shield crying blood tears, I don't believe that can be done without a full conversion mod. And I have no idea how to do that at this moment.

But the load screens change whenever you have them changing. If it's OnStart of your first map, it's going to only show the load screen once you leave.

Otherwise, I'm not too sure what you're saying.

i mean if i go from my first map to my second map, the loading screen doesnt show, but when i leave my second map to go to my first map, then go BACK to my second map, the loading screen shows up get it?
Have you tried placing it under
Code:
void OnLeave()
{

}
Pages: 1 2