The player wins, how do I terminate the game?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
AnalogousGumdropDecoder
Red Slime
Posts: 34
Joined: Mon Nov 17, 2014 5:25 am
Location: Nashville, TN, USA

The player wins, how do I terminate the game?

Post by AnalogousGumdropDecoder »

I've made a very simplistic game that consists of being assigned a fetch quest by an NPC, and one enemy to fight (who possesses the quest item). When you beat the enemy and return the quest item to the NPC, the NPC thanks the hero, etc. All of this is fine and working, but then the player is still trapped in the empty game world with nothing to do, and I need to END THIS!!!

Here's what I'd like to happen:
After the NPC thanks the player for fetching the quest item, if the player tries to leave the room (which has only one exit), then a text box is displayed, after which the game returns to the title screen.

How do I make this happen?
Last edited by AnalogousGumdropDecoder on Mon Jul 27, 2015 8:11 am, edited 1 time in total.
Cody Gaisser
User avatar
Jack
Slime Knight
Posts: 266
Joined: Tue Oct 16, 2007 2:39 pm
Location: Maine
Contact:

Post by Jack »

You have to create a fairly simple plotscript with the line "Game over". That will immediately exit the game (after the text box) and return to the title screen.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Trivia: since there is no way to do this without plotscripting, it was common before plotscripting was added to the engine for games to end with an infinite textbox loop, or otherwise telling the player to quit.
Last edited by TMC on Mon Jul 27, 2015 4:06 pm, edited 2 times in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Someday when we get around to converting the textbox format to reload, thus allowing more space for stuff, I'll totally add a textbox conditional that can do this.

But don't wait for that feature. It is a 3-line plotscript

Code: Select all

plotscript, quit now script, begin
  game over
end
AnalogousGumdropDecoder
Red Slime
Posts: 34
Joined: Mon Nov 17, 2014 5:25 am
Location: Nashville, TN, USA

Post by AnalogousGumdropDecoder »

Bob the Hamster wrote:Someday when we get around to converting the textbox format to reload, thus allowing more space for stuff, I'll totally add a textbox conditional that can do this.

But don't wait for that feature. It is a 3-line plotscript

Code: Select all

plotscript, quit now script, begin
  game over
end
Thanks a ton! Now I've got a compact working model I can tinker with until I've learned enough to put together sonething a little more interesting.
Cody Gaisser
Post Reply