Frictional Games Forum (read-only)
Ending & credits - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Ending & credits (/thread-7003.html)



Ending & credits - larslu - 03-22-2011

How do you make credits of the game and automatically end it self when the credits are done?


RE: Ending & credits - Viperdream - 03-22-2011

Code:
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
Example:
Code:
StartCredits("Outro..ogg", true, "Misc", "Credits", 2);

You will also need to create a new category in the .lang file for this:
Code:
<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


RE: Ending & credits - MrBigzy - 03-22-2011

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:


RE: Ending & credits - larslu - 03-22-2011

(03-22-2011, 08:47 PM)Viperdream Wrote:
Code:
StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum);
Example:
Code:
StartCredits("Outro..ogg", true, "Misc", "Credits", 2);

You will also need to create a new category in the .lang file for this:
Code:
<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?


RE: Ending & credits - Tanshaydar - 03-22-2011

Create a script area & add a collide call back.
I have a feeling that this is someone we know, with a different account.


RE: Ending & credits - Viperdream - 03-22-2011

Some people just don't know where the search button is ^^


RE: Ending & credits - larslu - 03-22-2011

(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.


RE: Ending & credits - Viperdream - 03-22-2011

Put this at: void OnStart()
Code:
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
Example:
Code:
AddEntityCollideCallback("Player", "CreditsArea", "Collide_Credits", true, 1);

Then: (anywhere, just don't put it inside any {})
Code:
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