[SOLVED] How do you make something happen when a file is deleted/moved?

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
[Fat Potato]
Newbie
Posts: 3
Joined: Tue Mar 23, 2021 7:03 pm
Contact:

[SOLVED] How do you make something happen when a file is deleted/moved?

#1 Post by [Fat Potato] » Tue Mar 23, 2021 7:22 pm

Hello :D , I have a question.
How do you make something happen when a file is deleted/moved? My example would be ddlc, where the ends when monika.chr gets deleted. Any help would be useful.
Thanks for reading! Bye.
Last edited by [Fat Potato] on Wed Mar 24, 2021 3:01 pm, edited 1 time in total.
“Don’t Let Yesterday Take Up Too Much Of Today.” – Will Rogers

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: How do you make something happen when a file is deleted/moved?

#2 Post by Ocelot » Wed Mar 24, 2021 3:52 am

The easiest way is to periodically check for file existence. Like an invisible screen with a timer which jumps into part of the script you need as soon as it detects that file is not present.
< < insert Rick Cook quote here > >

[Fat Potato]
Newbie
Posts: 3
Joined: Tue Mar 23, 2021 7:03 pm
Contact:

Re: How do you make something happen when a file is deleted/moved?

#3 Post by [Fat Potato] » Wed Mar 24, 2021 1:22 pm

Ocelot wrote:
Wed Mar 24, 2021 3:52 am
The easiest way is to periodically check for file existence. Like an invisible screen with a timer which jumps into part of the script you need as soon as it detects that file is not present.
Thanks a lot.
Although i have another question (sorry). How do you do that?
Bye
“Don’t Let Yesterday Take Up Too Much Of Today.” – Will Rogers

[Fat Potato]
Newbie
Posts: 3
Joined: Tue Mar 23, 2021 7:03 pm
Contact:

Re: How do you make something happen when a file is deleted/moved?

#4 Post by [Fat Potato] » Wed Mar 24, 2021 1:32 pm

[Fat Potato] wrote:
Wed Mar 24, 2021 1:22 pm
Although i have another question (sorry). How do you do that?
Bye
nevermind i found out :D
“Don’t Let Yesterday Take Up Too Much Of Today.” – Will Rogers

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: [SOLVED] How do you make something happen when a file is deleted/moved?

#5 Post by Donmai » Wed Mar 24, 2021 5:56 pm

It seems DDLC remains popular :) .
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: No registered users