Disabling clicking during transitions?

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
DANCUBE
Regular
Posts: 28
Joined: Thu Apr 26, 2012 3:09 pm
Contact:

Disabling clicking during transitions?

#1 Post by DANCUBE » Sat Oct 27, 2012 10:31 pm

I've seen a few threads about this, none of which really helped/worked, so I'm sorry if this seems repetitive.
How can I disable and enable the use of clicking? This would be really helpful for making sure a transition completes before the user can advance.

For example, if I wish to code a segment where I display various images/text that is timed to advance on its own, and I want to have the user wait until said segment has finished before they can advance, how would I achieve this?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Disabling clicking during transitions?

#2 Post by PyTom » Sat Oct 27, 2012 11:00 pm

Doing this is a really bad idea. When the user clicks, it's often because they want to skip the transition - for example, if this is the second or later time they've played the game, and they know what's going to happen. It's rare that users will just randomly click through a transition, and if they do - well, that's what rollback is for.

That being said, if you really want to do this:

Code: Select all

$ renpy.transition(dissolve)
$ renpy.pause(.5, hard=True)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
DANCUBE
Regular
Posts: 28
Joined: Thu Apr 26, 2012 3:09 pm
Contact:

Re: Disabling clicking during transitions?

#3 Post by DANCUBE » Sat Oct 27, 2012 11:24 pm

Thanks Tom, some parts of my VN have say, one short line of text, with a few fading images that must be displayed while that line is on-screen, so the user may not realize that advancing to the next line will go to ANOTHER set of images in transition.
That code helps, the transitions aren't long whatsoever, but definitely extremely easy to skip over, since the dialogue is so short.

Without using hard pauses, is there any way to control the ability to left click? eg. Enabling and disabling use of left-clicking through a flag? This would help for an un-skipable intro/splashscreen if you could disable clicking at the start, and once it's over, re-enable left clicking.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Disabling clicking during transitions?

#4 Post by PyTom » Sat Oct 27, 2012 11:31 pm

No. Ren'Py tries fairly hard to be responsive to user input, so there's no way to disable it globally.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
DANCUBE
Regular
Posts: 28
Joined: Thu Apr 26, 2012 3:09 pm
Contact:

Re: Disabling clicking during transitions?

#5 Post by DANCUBE » Sat Oct 27, 2012 11:37 pm

PyTom wrote:No. Ren'Py tries fairly hard to be responsive to user input, so there's no way to disable it globally.
Hm, I assumed doing that would be fairly simple, oh well.

Code: Select all

scene white with dissolve
scene interlude_background with dissolve:
    subpixel True
    align (0.5, 0.5)
    zoom 1.4
    ease 8 zoom 1
show beta with dissolve
pause 2
hide beta with dissolve
pause .5
show logo with dissolve
pause 3
show white with Dissolve(3)
pause 2
Would you recommend using hard pauses for making this unskipable? I'd rather have the player see this through without being able to advance until the end.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Disabling clicking during transitions?

#6 Post by nyaatrap » Sat Oct 27, 2012 11:45 pm

How about using persistent variable?

Code: Select all

if persistent.variable == None:
  show image
  $pause(.5, hard=true)
  $persistent.variable = True
else:
  show image
  $ pause(.5)
Then player can skip at the 2nd play.

User avatar
papillon
Arbiter of the Internets
Posts: 4104
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

Re: Disabling clicking during transitions?

#7 Post by papillon » Sun Oct 28, 2012 5:40 am

PyTom wrote:It's rare that users will just randomly click through a transition, and if they do - well, that's what rollback is for.
I thought this, until I had multiple testers who missed several chapter title screens entirely without even realising that they'd missed them (rolling back is no use if you don't know you missed something to roll back for) I've ended up having to sprinkle a bunch of split-second hard pauses to ensure that people will at least see a tiny flicker of the image when clicking too fast (or skipping) so that they'll know that it was there, without it actually slowing them down if they are trying to skip.

User avatar
DANCUBE
Regular
Posts: 28
Joined: Thu Apr 26, 2012 3:09 pm
Contact:

Re: Disabling clicking during transitions?

#8 Post by DANCUBE » Sun Oct 28, 2012 6:02 pm

I'm pretty sure I'm having trouble understanding how hard pauses work in this situation.
If I declare a hard pause, I'm aware that the player cannot click through it, however the game will NOT proceed to display the next transition until the hard pause has ended.
I understand the nature of a hard pause, but I can't see it helping in my situation.

Can anybody (even briefly) shine some light on this for me? If you could refer to my code that would help a ton.

User avatar
papillon
Arbiter of the Internets
Posts: 4104
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

Re: Disabling clicking during transitions?

#9 Post by papillon » Sun Oct 28, 2012 7:28 pm

If I declare a hard pause, I'm aware that the player cannot click through it, however the game will NOT proceed to display the next transition until the hard pause has ended.
Isn't that what you wanted? Forcing the whole thing to display without interruption? If not, I think you need to explain more clearly what you're trying to achieve.

User avatar
DANCUBE
Regular
Posts: 28
Joined: Thu Apr 26, 2012 3:09 pm
Contact:

Re: Disabling clicking during transitions?

#10 Post by DANCUBE » Sun Oct 28, 2012 8:02 pm

papillon wrote:
If I declare a hard pause, I'm aware that the player cannot click through it, however the game will NOT proceed to display the next transition until the hard pause has ended.
Isn't that what you wanted? Forcing the whole thing to display without interruption? If not, I think you need to explain more clearly what you're trying to achieve.
Yes, but a hard pause prevents the next transition from occurring, which is not what I want, I want a multiple transitions to play without the user being able to skip it, is this even possible?

User avatar
papillon
Arbiter of the Internets
Posts: 4104
Joined: Tue Aug 26, 2003 4:37 am
Completed: lots; see website!
Projects: something mysterious involving yuri, usually
Organization: Hanako Games
Tumblr: hanakogames
Contact:

Re: Disabling clicking during transitions?

#11 Post by papillon » Sun Oct 28, 2012 8:13 pm

I don't understand. It doesn't stop the next transition from occurring, it just means that the next one can't happen until that hard pause ends.

Your code already has separate timed pauses for each transition, doesn't it?

User avatar
MilywayObree
Newbie
Posts: 17
Joined: Sun Jan 28, 2018 11:24 am
Completed: None so far, pending to be exact
Projects: DDLC, The notebook and other secret projects
Organization: Vocastin/Oriaa Pro-Creations
Deviantart: MexicoRPelino
Github: HizashiroTakahashi
Skype: PixelMINEGaming
Location: Philippines
Contact:

Re: Disabling clicking during transitions?

#12 Post by MilywayObree » Sun Mar 04, 2018 12:40 am

I've seen a game called DDLC and it uses hard pauses globally without defining it all over again, i'm looking forward for some help on how to do it.
Just Monika.

User avatar
MilywayObree
Newbie
Posts: 17
Joined: Sun Jan 28, 2018 11:24 am
Completed: None so far, pending to be exact
Projects: DDLC, The notebook and other secret projects
Organization: Vocastin/Oriaa Pro-Creations
Deviantart: MexicoRPelino
Github: HizashiroTakahashi
Skype: PixelMINEGaming
Location: Philippines
Contact:

Re: Disabling clicking during transitions?

#13 Post by MilywayObree » Sun Mar 04, 2018 12:40 am

I've seen a game called DDLC and it uses hard pauses globally without defining it all over again, i'm looking forward for some help on how to do it.
Just Monika.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Disabling clicking during transitions?

#14 Post by Ocelot » Sun Mar 04, 2018 1:55 am

There is a _dismiss_pause store variable. Never used it, so I cannot say, how well it works.

Also about DDLC:
Find: pause
>>> Search Complete: 242 matching lines where found. Files Searched: 83

That's a lot of pauses.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Bing [Bot], enaielei