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.
-
InvertMouse
- Regular
- Posts: 95
- Joined: Sat May 31, 2014 3:41 am
- Completed: Unhack
- Organization: InvertMouse
- Location: Sydney, Australia
-
Contact:
#1
Post
by InvertMouse » Tue Jun 02, 2015 3:25 pm
Hello everyone

! Got a couple of questions if that’s okay:
- Is it possible to not allow players to skip a screen until a few seconds has passed? For example, I might have a thank you for playing image at the end of the game, but if the player spam clicks, she will kip the message without realizing. Is it possible to disable click (or hitting enter etc) until an image has transitioned in fully?
- Let’s say I have a decision point:
menu:
"Option A":
jump option_a
"Option B":
jump option_b
And I want option b to be disabled until $ persistent.isOptionBAvailable = true. How would I manage that? I would like the button to look faded out if it is disabled as well.
Thank you heaps!
-
xela
- Lemma-Class Veteran
- Posts: 2481
- Joined: Sun Sep 18, 2011 10:13 am
-
Contact:
#2
Post
by xela » Tue Jun 02, 2015 3:36 pm
Code: Select all
"Option B" if persistent.isOptionBAvailable:
jump option_b
You'll have to mess with the screen to fade the option out.
Like what we're doing? Support us at:

-
trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
-
Contact:
#3
Post
by trooper6 » Tue Jun 02, 2015 3:48 pm
Question 1 is usually dealt with using a hard pause.
Code: Select all
show screen end_game()
$renpy.pause(3.0, hard=True)
That is documented here:
http://www.renpy.org/doc/html/other.html#renpy.pause
and there are lots of threads about it in these forums.
Question 2 is done using the basic coding if you are using the regular menu options documented here:
http://www.renpy.org/doc/html/menus.html#in-game-menus
For your example, you'd just do:
Code: Select all
init python:
if not persistent.isOptionBAvailable:
persistent.isOptionBAvailable = False
label start:
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
menu:
"What do you choose?"
"Option A":
jump labelA
"Obtion B" if persistent.isOptionBAvailable:
jump labelB
As for having the option show up and be greyed out...I don't know about that. You might have to do custom menu options for that.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
-
InvertMouse
- Regular
- Posts: 95
- Joined: Sat May 31, 2014 3:41 am
- Completed: Unhack
- Organization: InvertMouse
- Location: Sydney, Australia
-
Contact:
#4
Post
by InvertMouse » Thu Jun 04, 2015 5:44 am
Thank you so much for the help folks! I will look into these solutions asap

.
Users browsing this forum: Ocelot