How to forbid during the game ?

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
Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

How to forbid during the game ?

#1 Post by Zearth »

Hey, first, sorry if my english looks bad, i'm french.

In my game, I put successive pictures with a specific effect that is essential. However, if the user just clicks once, the effect will be skipped.
How could I forbid the click during this period ?

Thank you very much.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to forbid during the game ?

#2 Post by Aleema »

Code: Select all

$ renpy.pause(1.0, hard=True)
Change "1.0" to the number of seconds you need to be unclickable.

Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Re: How to forbid during the game ?

#3 Post by Zearth »

thanks a lot, i'll test it :)

Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Re: How to forbid during the game ?

#4 Post by Zearth »

It doesn't work, it shows a black screen...

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to forbid during the game ?

#5 Post by Aleema »

How are you showing images?

Zearth
Newbie
Posts: 10
Joined: Sun Jun 21, 2009 3:43 pm
Contact:

Re: How to forbid during the game ?

#6 Post by Zearth »

MMh, in fact I tasted another placement, this is my code :

Code: Select all

    play sound "CYMBALES3.mp3"
    show tisteed
    with fade
    $ renpy.pause(0.1, hard=True)
    
    
    play sound "CYMBALES3.mp3"
    show tistemelo
    with fade
    $ renpy.pause(0.1, hard=True)
    
    play sound "CYMBALES3.mp3"
    show tisteax
    with fade
    $ renpy.pause(0.1, hard=True)
    
    play sound "CYMBALES3.mp3"
    show tistelucy
    with fade
    $ renpy.pause(0.1, hard=True)
    
    play sound "CYMBALES3.mp3"    
    show fond2
    with fade
    $ renpy.pause(0.1, hard=True)
I want my pictures appear during 0.1 sec and there are 5 pictures like that, I want the user isn't able to click during this moment (because it will skip it)

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to forbid during the game ?

#7 Post by Aleema »

Try showing your image like this:

Code: Select all

show tisteed:
        alpha 0
        linear 0.5 alpha 1.0
        linear 0.5 alpha 0.0
$ renpy.pause(1.0, hard=True)
If you want the picture to only show for 0.1, then that is too brief to really need the prevent clicking. I'm not sure what you're building, but working in ATL to make all of these images one image will help you, so that all you need to do is show one image like I just did with the Pause after it will the total time to wait.

Otherwise, just let the user mess up their experience if they want to!

Post Reply

Who is online

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