Payday day

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
User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Payday day

#1 Post by DragonKnight »

I need a code that monitors the day. For example: I get paid every 7 day, I need a code that monitors and does that automatically. I know I asking alot.
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

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

Re: Payday day

#2 Post by Imperf3kt »

This depends highly on how your game advances 'days'

Sharing some code is necessary.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Payday day

#3 Post by DragonKnight »

Code: Select all

  "The next day"
    $ day_gone_by +=1
    "Day = %(day_gone_by)d"  
This is what I have so far. I need a code that can monitor that day_gone_by and every 7 days I have a payday. I just need to do it automatically. I just write the code and change the day. That enough??
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

irredeemable
Regular
Posts: 78
Joined: Thu Feb 08, 2018 7:57 am
Contact:

Re: Payday day

#4 Post by irredeemable »

Code: Select all

if day_gone_by % 7 == 0:
    "Today is payday."

User avatar
DragonKnight
Regular
Posts: 51
Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:

Re: Payday day

#5 Post by DragonKnight »

Thank you!!!
Currently working on Taboo Hearts :D
Currently working on Forbidden :D

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]