How to Make a VN Automatically Quit? [Solved]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Katy133
Miko-Class Veteran
Posts: 704
Joined: Sat Nov 16, 2013 1:21 pm
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Projects: The Butler Detective
Tumblr: katy-133
Deviantart: Katy133
Soundcloud: Katy133
itch: katy133
Location: Canada
Contact:

How to Make a VN Automatically Quit? [Solved]

#1 Post by Katy133 »

I'm trying to figure out how to script an event where the game quits by itself at a specific point, not by the player's choice. And not through a menu; I want the game to quit in the middle of the visual novel's narrative.

Basically, I want this to happen:
- Character says something.
- The game automatically closes (to the desktop) by itself, without a "you sure you want to quit" prompt.

Thanks!
Last edited by Katy133 on Sat Feb 06, 2016 6:20 pm, edited 1 time in total.
ImageImage

My Website, which lists my visual novels.
Become a patron on my Patreon!

User avatar
Evildumdum
Regular
Posts: 191
Joined: Sun Jan 18, 2015 8:49 am
Projects: ApoclypseZ
Contact:

Re: How to Make a VN Automatically Quit?

#2 Post by Evildumdum »

I'm going to apologise in advance. I don't know how to do this. I am just really interested in the reason you want that. It seems an odd thing to do so im curious. :)
"If at first you don't succeed, try hitting it with a shoe."

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to Make a VN Automatically Quit?

#3 Post by Alex »

Moral stuff aside, you can make it like

Code: Select all

# The game starts here.
label start:
    "..."
    $ Quit(confirm=False)()
(any screen action can be used like this - just don't forget a pair of extra parentheses)
http://www.renpy.org/doc/html/screen_ac ... nu-actions

User avatar
Rosstin
Veteran
Posts: 368
Joined: Mon Jan 31, 2011 5:43 pm
Completed: Rex Rocket, Kitty Love, King's Ascent
Projects: Road Redemption, Queen At Arms
Organization: Aqualuft Games
Contact:

Re: How to Make a VN Automatically Quit?

#4 Post by Rosstin »

Sounds like some Undertale-style stuff, haha.
Image

User avatar
Katy133
Miko-Class Veteran
Posts: 704
Joined: Sat Nov 16, 2013 1:21 pm
Completed: Eight Sweets, The Heart of Tales, [redacted] Life, Must Love Jaws, A Tune at the End of the World, Three Guys That Paint, The Journey of Ignorance, Portal 2.5.
Projects: The Butler Detective
Tumblr: katy-133
Deviantart: Katy133
Soundcloud: Katy133
itch: katy133
Location: Canada
Contact:

Re: How to Make a VN Automatically Quit?

#5 Post by Katy133 »

Alex wrote:Moral stuff aside, you can make it like

Code: Select all

# The game starts here.
label start:
    "..."
    $ Quit(confirm=False)()
(any screen action can be used like this - just don't forget a pair of extra parentheses)
http://www.renpy.org/doc/html/screen_ac ... nu-actions
Thank you! That works.
Evildumdum wrote:I'm going to apologise in advance. I don't know how to do this. I am just really interested in the reason you want that. It seems an odd thing to do so im curious. :)
I want to play around with some ideas I have before NaNoRenO in March. I'm just testing out what I can and can't do.
ImageImage

My Website, which lists my visual novels.
Become a patron on my Patreon!

Post Reply

Who is online

Users browsing this forum: Ocelot, Toma