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
Death to main menu
HeadyBoy Offline
Junior Member

Posts: 45
Threads: 16
Joined: Jul 2012
Reputation: 0
#1
Death to main menu

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

Voice Actor - Male, British Accent, Mid-teens, Adaptable
Custom Stories - "The Heist: Amnesia" (In production)
08-02-2012, 07:55 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Death to main menu

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!

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:
<Category name="Game">
<Entry name="GameOver">Some text or prologue or something...</Entry>
</Category>

(This post was last modified: 08-02-2012, 10:35 PM by Apjjm.)
08-02-2012, 10:32 PM
Find
HeadyBoy Offline
Junior Member

Posts: 45
Threads: 16
Joined: Jul 2012
Reputation: 0
#3
RE: Death to main menu

(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!

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:
Some text or prologue or something...




Why thank you very much Big Grin I will try this as soon as I can and give you my feedback then

Voice Actor - Male, British Accent, Mid-teens, Adaptable
Custom Stories - "The Heist: Amnesia" (In production)
08-03-2012, 12:15 AM
Find
HeadyBoy Offline
Junior Member

Posts: 45
Threads: 16
Joined: Jul 2012
Reputation: 0
#4
RE: Death to main menu

Done this. It works. But.. there is just a LONG blackness before "the end" comes on the screen. None of my custom text, music etc

Voice Actor - Male, British Accent, Mid-teens, Adaptable
Custom Stories - "The Heist: Amnesia" (In production)
08-03-2012, 01:33 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Death to main menu

You could try to force the game to crash and say that's intended, though it won't necessarily take you to the main menu.

For example, call this in the checkpoint callback:

PHP Code: (Select All)
AddEntityCollideCallback("NAME_OF_DOOR""NAME_OF_GRAB_ENTITY""COLLIDE_CALLBACK"false1); 

This should cause the game to crash when called.

Tutorials: From Noob to Pro
(This post was last modified: 08-03-2012, 01:50 AM by Your Computer.)
08-03-2012, 01:49 AM
Website Find




Users browsing this thread: 1 Guest(s)