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 ?
locker Offline
Junior Member

Posts: 14
Threads: 1
Joined: Sep 2010
Reputation: 0
#2
RE: Make an end ?

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);
}
10-04-2010, 04:45 PM
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)