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
Make an end ?
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#3
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
Find


Messages In This Thread
Make an end ? - by fantino - 10-04-2010, 10:54 AM
RE: Make an end ? - by locker - 10-04-2010, 04:45 PM
RE: Make an end ? - by Chilton - 10-05-2010, 03:05 AM
RE: Make an end ? - by fantino - 10-05-2010, 03:33 PM



Users browsing this thread: 1 Guest(s)