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
Ending & credits
larslu Offline
Junior Member

Posts: 30
Threads: 15
Joined: Mar 2011
Reputation: 0
#1
Ending & credits

How do you make credits of the game and automatically end it self when the credits are done?
03-22-2011, 08:43 PM
Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#2
RE: Ending & credits

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

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

(This post was last modified: 03-22-2011, 08:49 PM by Viperdream.)
03-22-2011, 08:47 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#3
RE: Ending & 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:
(This post was last modified: 03-22-2011, 08:48 PM by MrBigzy.)
03-22-2011, 08:47 PM
Find
larslu Offline
Junior Member

Posts: 30
Threads: 15
Joined: Mar 2011
Reputation: 0
#4
RE: Ending & credits

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

You will also need to create a new category in the .lang file for this:
<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?
03-22-2011, 09:07 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#5
RE: Ending & credits

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

03-22-2011, 09:14 PM
Website Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#6
RE: Ending & credits

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

03-22-2011, 09:17 PM
Find
larslu Offline
Junior Member

Posts: 30
Threads: 15
Joined: Mar 2011
Reputation: 0
#7
RE: Ending & credits

(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.
03-22-2011, 09:35 PM
Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#8
RE: Ending & credits

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

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

(This post was last modified: 03-22-2011, 09:45 PM by Viperdream.)
03-22-2011, 09:44 PM
Find




Users browsing this thread: 1 Guest(s)