Is it possible to connect a renpy game with the computer time?
Example: if it is 11:00 - 15:00, person A's hairstyle will change. (That's not how it works in my game, it's just an example.)
If it is possible, how to do it?
renpy and computer time
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.
-
- Veteran
- Posts: 299
- Joined: Thu Jul 07, 2011 9:33 am
- Projects: BloomingBlossoms
- Contact:
-
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: renpy and computer time
Read about Python datetime module.
Then you'll just have to compare the values and use LiveComposite or any other function of your choice.
Then you'll just have to compare the values and use LiveComposite or any other function of your choice.
Re: renpy and computer time
Kind of example
Code: Select all
init python:
import time
label start:
$ my_var = time.localtime()
$ show_date = str (my_var)
"[show_date]"
$ show_date = str("%d.%d.%d" %(my_var [2],my_var [1],my_var [0]) )
"[show_date]"
-
- Veteran
- Posts: 299
- Joined: Thu Jul 07, 2011 9:33 am
- Projects: BloomingBlossoms
- Contact:
Re: renpy and computer time
Ah, thank you two!
I read the module, now I'll try it out once I get Ren'Py to work...
I read the module, now I'll try it out once I get Ren'Py to work...
Who is online
Users browsing this forum: Ocelot