Frictional Games Forum (read-only)

Full Version: Ending & credits
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do you make credits of the game and automatically end it self when the credits are done?
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
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:
(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?
Create a script area & add a collide call back.
I have a feeling that this is someone we know, with a different account.
Some people just don't know where the search button is ^^
(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.
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