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!
How to Make a VN Automatically Quit? [Solved]
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.
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.
- 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]
Last edited by Katy133 on Sat Feb 06, 2016 6:20 pm, edited 1 time in total.
- Evildumdum
- Regular
- Posts: 191
- Joined: Sun Jan 18, 2015 8:49 am
- Projects: ApoclypseZ
- Contact:
Re: How to Make a VN Automatically Quit?
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."
Re: How to Make a VN Automatically Quit?
Moral stuff aside, you can make it like
(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
Code: Select all
# The game starts here.
label start:
"..."
$ Quit(confirm=False)()
http://www.renpy.org/doc/html/screen_ac ... nu-actions
- 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?
Thank you! That works.Alex wrote:Moral stuff aside, you can make it like(any screen action can be used like this - just don't forget a pair of extra parentheses)Code: Select all
# The game starts here. label start: "..." $ Quit(confirm=False)()
http://www.renpy.org/doc/html/screen_ac ... nu-actions
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.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.