Chilton
Member
Posts: 138
Threads: 9
Joined: Sep 2010
Reputation:
0
|
RE: Make an end ?
(10-04-2010, 04:45 PM)locker Wrote: You could try placing in the function void OnStart() a call to add the player entity collide callback function, when collides with an area. In this case, your area name is "MyAreaName". The engine will check if the player collides with the given entity(area) and if does, then the CollideEnd (...) functions is called
Something like this
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "MyAreaName", "CollideEnd", true, 1);
}
void CollideEnd(string &in asParent, string &in asChild, int alState)
{
FadeOut(1.0f);
AddTimer("credits", 2.0f, "TimerCredits");
}
void TimerCredits(string &in asTimer)
{
StartCredits("credits.ogg", false, "Ending", "MyCredits", -1);
}
This - And maybe use a timer for before the credits roll so you can make an epilogue of some kind
|
|
10-05-2010, 03:05 AM |
|