How to use Forced Quit

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
TheMCButterfly
Newbie
Posts: 17
Joined: Sat Mar 30, 2019 12:16 pm
Projects: Friends Forever - Talk to a character
IRC Nick: Butterfly
Contact:

How to use Forced Quit

#1 Post by TheMCButterfly » Mon Apr 01, 2019 2:58 am

Hello, I'm Butterfly! Who's willing to help me?
In my game, I want you to be forced to close the game, which I know how to do.

Code: Select all

$ renpy.quit()
But how do you make it put you back to the start, and save you there, and then kick you out?

My aim:

Kick player
Reload the game
Click start
Rejoin back with my character greeting you

How do you do this?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3636
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: How to use Forced Quit

#2 Post by Imperf3kt » Mon Apr 01, 2019 5:15 am

Do you want to completely wipe the players save data and overwrite it with a save at the beginning of the game?
That sounds awfully horrible. Are you absolutely sure you want to do this? (Its possible, but extremely highly inadvisable)
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: How to use Forced Quit

#3 Post by isobellesophia » Mon Apr 01, 2019 9:29 am

https://www.renpy.org/doc/html/other.ht ... oad_script
https://www.renpy.org/doc/html/other.html#renpy.quit
https://www.renpy.org/doc/html/persistent.html

after all of that, make a character's greeting. inside of a ":" block.



Sorry i cant give any examples today. too lazy.
I am a friendly user, please respect and have a good day.


Image

Image


TheMCButterfly
Newbie
Posts: 17
Joined: Sat Mar 30, 2019 12:16 pm
Projects: Friends Forever - Talk to a character
IRC Nick: Butterfly
Contact:

Re: How to use Forced Quit

#4 Post by TheMCButterfly » Mon Apr 01, 2019 11:17 am

Imperf3kt wrote:
Mon Apr 01, 2019 5:15 am
Do you want to completely wipe the players save data and overwrite it with a save at the beginning of the game?
That sounds awfully horrible. Are you absolutely sure you want to do this? (Its possible, but extremely highly inadvisable)
I mean it saves their data, but it gives them a "join screen" or whatever.

Post Reply

Who is online

Users browsing this forum: Google [Bot]