08-02-2012, 07:55 PM
Like in Justine.. is there anyway for when you die, to return to the main menu? I tried making saves etc but for the length my story is I think it would be better to have that feature instead of respawning
void OnEnter() {
CheckPoint("GameOver","PlayerStartArea_1","cbGameOver", "", "");
}
void cbGameOver(string &in asName, int alCount) {
StartCredits("GameOverMusic.ogg", false, "Game", "GameOver", 0);
}
<Category name="Game">
<Entry name="GameOver">Some text or prologue or something...</Entry>
</Category>
(08-02-2012, 10:32 PM)Apjjm Wrote: [ -> ]As far as i am aware, it isn't possible to force the game to exit when dead (except inside the justine full conversion), and if it is possible - you will probably need a full conversion. However, you can achieve the same effect without a full conversion rather trivially by using StartCredits (This also has the benefit of not outright exiting the game too). All you need to do is set a checkpoint callback which then starts a set of pseudo-credits saying "game over" or something.
Example:
Spoiler below!
Code:void OnEnter() {
CheckPoint("GameOver","PlayerStartArea_1","cbGameOver", "", "");
}
void cbGameOver(string &in asName, int alCount) {
StartCredits("GameOverMusic.ogg", false, "Game", "GameOver", 0);
}
with a .lang category:
Code:Some text or prologue or something...
AddEntityCollideCallback("NAME_OF_DOOR", "NAME_OF_GRAB_ENTITY", "COLLIDE_CALLBACK", false, 1);