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.
Hello, This is a newbie post and i need help on stuff and backgrounds for a day and night system. Basically, the game has 4 parts of the day. Morning, Noon, Afternoon and night.
So it goes like this..
label start:
$ day = 4
menu day1:
"Park":
c "you went out on a walk."
$ day -= 1
c "you now have [day] points."
"Pool":
c "You went swimming."
$ day -= 1
c "You now have [day] points."
"Rest":
c "You slept good."
$ day += 4
c "You now have [day] points."
But i don't want it to go beyond 4 points and if there's no point left i need to make the player rest and make it unable to do more stuff. And also the background would change from day to night as the day points go from 4 to 1. Kinda like the Summertime Saga day/night engine! How do i do this? Any help will be lovely!
Tritonials wrote: ↑Sat Dec 29, 2018 12:42 pm
Hello, This is a newbie post and i need help on stuff and backgrounds for a day and night system. Basically, the game has 4 parts of the day. Morning, Noon, Afternoon and night.
So it goes like this..
label start:
$ day = 4
menu day1:
"Park":
c "you went out on a walk."
$ day -= 1
c "you now have [day] points."
"Pool":
c "You went swimming."
$ day -= 1
c "You now have [day] points."
"Rest":
c "You slept good."
$ day += 4
c "You now have [day] points."
But i don't want it to go beyond 4 points and if there's no point left i need to make the player rest and make it unable to do more stuff. And also the background would change from day to night as the day points go from 4 to 1. Kinda like the Summertime Saga day/night engine! How do i do this? Any help will be lovely!
To make sure the number of points never gets larger than 4 you can add this after each time something is added to day.
if day ==0:
c "You don't have any points left. You need to rest before you can do something more."
else:
c "you went out on a walk."
$ day -= 1
c "you now have [day] points."
Ah, Thank you for replying to my post! But i'm still waiting for the answer for my last question which is the backgrounds. But, these will be very helpful Thank you again!
Tritonials wrote: ↑Sat Dec 29, 2018 9:29 pm
Ah, Thank you for replying to my post! But i'm still waiting for the answer for my last question which is the backgrounds. But, these will be very helpful Thank you again!