Frictional Games Forum (read-only)
How to make credits in the end???? [WHERE ..TO...PUT...][not solved] - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How to make credits in the end???? [WHERE ..TO...PUT...][not solved] (/thread-7762.html)

Pages: 1 2


How to make credits in the end???? [WHERE ..TO...PUT...][not solved] - waqas12346 - 05-02-2011

I was wondering how to make credits in the end, I mean when I open a door that lead me into the other map, I don't want this, I want to make that door lead me to the credits Big Grin


RE: How to make credits in the end???? - Tanshaydar - 05-02-2011

There is a credits function, if you are able to search no wonder you will find it.


RE: How to make credits in the end???? [NOT SOLVE] - waqas12346 - 05-02-2011

I can't find it Sad what do I do now??


RE: How to make credits in the end???? [NOT SOLVE] - Mofo - 05-02-2011

This is from the last level:

In the map.hps:
StartCredits("ending_alexander.ogg",false, "Ending", "MainCredits", 0);

In the extra_english.lang
<CATEGORY Name="Ending">
<Entry Name="MainCredits">- A FRICTIONAL GAMES PRODUCTION -[br][br][br]- AMNESIA: THE D... etc</Entry>
</CATEGORY>


RE: How to make credits in the end???? [NOT SOLVE] - Roenlond - 05-02-2011

I'm guessing that you can do this in addition to what Mofo said:

in YourLastLevel.hps:

void onLeave()
{
StartCredits("musictoplay", true, "Category", "Entry name", 0);
}

Edit what's in the quotes, change true to false if you don't want the music you chose to loop.


RE: How to make credits in the end???? [NOT SOLVE] - waqas12346 - 05-02-2011

WHERE DO I PUT THAT THING IN THE SCRIPT Angry

Quote:void OnStart()
{
PlayMusic("25_amb.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Function01", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Function02", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Function03", true, 1);
}

void Function01(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_9", 0, "");
PlayMusic("guardian_distant2", false, 13.0f, 0, 0, true);
}

void Function02(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_2");
FadeOut(20.0);
FadeIn(20.0);
PlayMusic("guardian_distant3", false, 13.0f, 0, 0, true);
PlayMusic("25_guardian_slime_appear03", false, 13.0f, 0, 0, true);
}

void Function03(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster1", true);
AddEnemyPatrolNode("Monster1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_23", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_25", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_26", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_28", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_29", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_30", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_31", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_32", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_33", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_34", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_35", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_36", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_37", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_38", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_39", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_40", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_41", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_42", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_43", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_44", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_45", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_46", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_47", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_48", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_49", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_50", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_51", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_52", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_53", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_54", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_55", 0, "");
AddEnemyPatrolNode("Monster1", "PathNodeArea_56", 0, "");
PlayMusic("23_amb.ogg", true, 1.0f, 0, 0, true);
}

/////////////
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void onLeave()
{
}



RE: How to make credits in the end???? [WHERE ..TO...PUT...] - Roenlond - 05-02-2011

Read my post again... Right at the bottom of your script.

void onLeave()
{
StartCredits("musictoplay", true, "Category", "Entry name", 0);
}


RE: How to make credits in the end???? [WHERE ..TO...PUT...][not solved] - waqas12346 - 05-02-2011

I did what you said, I put it on the bottom and it didnt work, Do I need to create a empty map for it Huh


RE: How to make credits in the end???? [WHERE ..TO...PUT...][not solved] - Roenlond - 05-02-2011

No. It will show up the contents of your extra_english.lang file. If it doesn't show up, make sure you actually use the correct name (should be exactly the same as in extra_english.lang) and that you're calling it with the OnLeave function.


RE: How to make credits in the end???? [NOT SOLVE again] - Karai16 - 05-02-2011

I also has question... (sorry)

Code:
void OnStart()
{
    SetEntityPlayerInteractCallback("TowerDoor", "TeleportFunction", true);
    AddEntityCollideCallback("Player", "ScriptArea_1", "StartCredits", true, 1);
}


void TeleportFunction(string &in asEntity)
{
ChangeMap("Custom", "PlayerStartArea_2", "", "");
}


void StartCredits(string &in asParent, string &in asChild, int alState)
{
    FadeOut(0.1f);
       AddTimer("credits", 2.0f, "TimerCredits");
}


void TimerCredits(string &in asTimer)
{
    StartCredits("credits.ogg", true, "Ending", "MyCredits", 0);
}
I put the music file in a music folder in the main folder of the custom story. The problem is, it won't play. can somebody tell me what's wrong?