Make player wait before continuing
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.
-
georgewbush
- Newbie
- Posts: 13
- Joined: Fri Nov 30, 2018 5:14 pm
- Contact:
Make player wait before continuing
Hi, so to put it in simple terms. I have a map and there are places for the player to click on the map. When a player clicks on let's say "Building A", he plays through the scene 1, etc and when done is returned to the map. However, I don't want the player to click on the "Building A" again and do scene 2, etc. (Building A has about 20 scenes, you complete each one before continuing).
So my question is, How can I put in like a "waiting period" before the next scene is available for play in "Building A"? The whole point is to encourage the player to do other things on the map instead of blaze through each scene. I'd like to force the player to go home and sleep or something then the next day he can play "Building A", go to sleep. Rinse and repeat."
Any ideas?
So my question is, How can I put in like a "waiting period" before the next scene is available for play in "Building A"? The whole point is to encourage the player to do other things on the map instead of blaze through each scene. I'd like to force the player to go home and sleep or something then the next day he can play "Building A", go to sleep. Rinse and repeat."
Any ideas?
-
TheChatotMaestro
- Regular
- Posts: 91
- Joined: Mon Jul 31, 2017 8:33 am
- Deviantart: LedianWithACamera
- Contact:
Re: Make player wait before continuing
My suggestion would be have a variable called $buildingavailable or something. You need it set to 'yes' to enter Building A, but every time you do a scene in Building A, it turns the variable to 'no'. The only way to turn it back to 'yes' would be doing some other action, like sleeping.
-
georgewbush
- Newbie
- Posts: 13
- Joined: Fri Nov 30, 2018 5:14 pm
- Contact:
Re: Make player wait before continuing
Thanks for the response. Do you have a code I could use for that? or know where I can get it?
-
TheChatotMaestro
- Regular
- Posts: 91
- Joined: Mon Jul 31, 2017 8:33 am
- Deviantart: LedianWithACamera
- Contact:
Re: Make player wait before continuing
I don't know the exact context of your code, so I can't provide too detailed of a mockup, but it shouldn't be too hard to work in yourself.
Here's the code you might need for Building A:
Buildingevent, of course, would be set to 1 by default, so it would send you to the first scene if you hadn't ever gone in before. Hub is my example of the label you would jump to to return the player back where they came from.
And here's the code you might need for an example scene inside Building A:
It contains your scene, then it adds one to the variable for determining what event you're on, turns off the ability to enter the building, and kicks you back to the Hub.
Finally, here's the code you might need for sleeping:
It's not too difficult, I bet you'll get the hang of it in no time.
(If anyone notices I've done something wrong, please correct me. I'm not 100% confident in my ability to math with variables, but I wanted to help anyways.)
Here's the code you might need for Building A:
Code: Select all
label buildinga:
if $buildingavailable = "no":
"I'm too tired right now..."
jump hub
elif $building available = "yes":
"Let's go!"
$ renpy.jump("buildingscene_" + buildingevent )
And here's the code you might need for an example scene inside Building A:
Code: Select all
label buildingscene_1:
"blah blah"
"stuff is happening"
$buildingevent = buildingevent + 1
$buildingavailable = no
jump hub
Finally, here's the code you might need for sleeping:
Code: Select all
label sleep:
"flavor text flavor text"
$buildingavailable = yes
jump hub
(If anyone notices I've done something wrong, please correct me. I'm not 100% confident in my ability to math with variables, but I wanted to help anyways.)
-
georgewbush
- Newbie
- Posts: 13
- Joined: Fri Nov 30, 2018 5:14 pm
- Contact:
Re: Make player wait before continuing
Thanks for your help!
Who is online
Users browsing this forum: Google [Bot]