Greetings.
I'm currently developing a game in Ren'py, and the idea of having certain events for christmas, new year, and halloween appeared.
How can I create an event that triggers only on those dates? I mean, not in game-time, but in real time. Like a special message if you play the game on December 25th or January 1st.
Triggering events in certain dates.
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.
- xavimat
- Eileen-Class Veteran
- Posts: 1461
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
- Discord: xavimat
- Contact:
Re: Triggering events in certain dates.
You can try this:But I won't work too much on events that are so difficult to find.
Code: Select all
init python:
from datetime import datetime
label start:
$ now = datetime.now()
$ now = str(now)
$ now = now[5:10]
"Today is [now]."
if now == "12-25":
"Merry Christmas!"
elif now == "01-01":
"Happy New Year!"
else:
":( Neither Christmas nor New Year ..."
return
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)
Re: Triggering events in certain dates.
I think that worked, because at least the game is not spitting errors, and the event is locked.
Thanks for your help.
Thanks for your help.
Who is online
Users browsing this forum: Ocelot