[SOLVED]Help with a sequence

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
KELPER
Regular
Posts: 47
Joined: Wed Jun 05, 2013 3:31 am
Contact:

[SOLVED]Help with a sequence

#1 Post by KELPER »

Hi! I would like to accomplish the following:

Code: Select all

centered "am I dreaming?"
#I want a 3 seconds pause after the dialogue showed, and then without clicking:
show background_bright
$ renpy.pause(0.3)
show background_dark
Now, I tried to use renpy.pause after the dialogue. But the changing of backgrounds doesnt happen until I click. When I click, the text dissapears, and what I want is showing the text, waiting 3 seconds, for example, then, without clicking, having the backgrounds change, and while that is happening I want the text to still be on top, and not flicker.

How do I do this?

Thanks for the help.
Last edited by KELPER on Mon Jun 24, 2013 10:02 pm, edited 1 time in total.

User avatar
chewpower
Regular
Posts: 36
Joined: Mon Feb 11, 2013 11:08 pm
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#2 Post by chewpower »

It can be done like this: declare an image with two background files in it.

Code: Select all

image bright_to_dark_bg:
    "background_bright.jpg"
    pause 3
    "background_dark.jpg"
Then

Code: Select all

scene bright_to_dark_bg
centered "am I dreaming?"
Like this?
I'm sorry if I'm too stupid, but I can't learn to walk on my own

KimiYoriBaka
Miko-Class Veteran
Posts: 636
Joined: Thu May 14, 2009 8:15 pm
Projects: Castle of Arhannia
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#3 Post by KimiYoriBaka »


KELPER
Regular
Posts: 47
Joined: Wed Jun 05, 2013 3:31 am
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#4 Post by KELPER »

KimiYoriBaka wrote:

Code: Select all

centered "am I dreaming?{w=3}{nw}"
http://www.renpy.org/doc/html/text.html ... -text-tags
Oh, Ive tried that already. It makes the text dissapears when the background is changing, which I dont want.. Thank you anyway :)

Chewpower Im gonna try your suggestion now.

KELPER
Regular
Posts: 47
Joined: Wed Jun 05, 2013 3:31 am
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#5 Post by KELPER »

Oh wait, I should have said. Its not that I have two different images, Its the same image with a filter I defined as bright, and another as dark. So I cant do what you suggested :(

KELPER
Regular
Posts: 47
Joined: Wed Jun 05, 2013 3:31 am
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#6 Post by KELPER »

edit: I could make it kinda work, I only need to photoshop two different backgrounds.
Now, its there anyway in that "animation" to play a sound every time the background changes?

edit2: Ok, nevermind. I could work around it with a combination of tags and animation. Too bad I cant use the filters in the image list.
Another thing: Is there anyway to prevent the user from clicking? It messes up the coordination of the sequence.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#7 Post by trooper6 »

So, I have the same pause problem...my main menu code is here:

Code: Select all

label main_menu:
    show black onlayer underlay
    play music "00 sounds/01DanseMacabre.mp3" fadeout 1
    pause 2.0 #pause 1
    show bg title onlayer overlay with Dissolve(1)
    pause 2.0 #pause 2
    call screen main_menu
My second pause just doesn't work.

What I want:

Screen is black.
Danse Macabre plays.
2 seconds later the tile screen dissolves in and stays there for 2 seconds.
The Main_menu screen dissolves in.

What I get:

Screen is black.
Danse Macabre plays.
2 seconds later the tile screen dissolves in.
Immediately after it shows up, the screen abruptly goes black and stays black for two seconds.
The Main_menu screen dissolves in.

I really wish I could figure out how to have the title image sit there for 2 seconds and not cut off immediately.
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

KimiYoriBaka
Miko-Class Veteran
Posts: 636
Joined: Thu May 14, 2009 8:15 pm
Projects: Castle of Arhannia
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#8 Post by KimiYoriBaka »

try bringing the same text back up as the next interaction.

Code: Select all

centered "am I dreaming?{w=3}{nw}"
show background_bright
extend "{w=0.3}{nw}"
show background_dark
extend ""

KELPER
Regular
Posts: 47
Joined: Wed Jun 05, 2013 3:31 am
Contact:

Re: Help with a sequence (sorry, I cant think of a better ti

#9 Post by KELPER »

KimiYoriBaka wrote:try bringing the same text back up as the next interaction.

Code: Select all

centered "am I dreaming?{w=3}{nw}"
show background_bright
extend "{w=0.3}{nw}"
show background_dark
extend ""
Ok, that did exactly what I wanted. Thank you very much. Ill leave the solution here.

Code: Select all

 centered "am I dreaming?{w=2.0}{nw}" with dissolve
    play sound scarysound
    show background_bright with None
    extend "{w=0.5}{nw}"
    show background_dark with None
    extend ""
That makes the text stay all the way through the background changing AND the sound happen exactly when the background changes.
Last edited by KELPER on Tue Jun 25, 2013 6:45 am, edited 1 time in total.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: [SOLVED]Help with a sequence

#10 Post by trooper6 »

I followed the spirit of your advice KimiYoriBaka and got my code to work like so:

Code: Select all

label main_menu:
    show black onlayer underlay
    play music "00 sounds/01DanseMacabre.mp3" fadeout 1
    pause 2.0
    show bg title onlayer overlay with Dissolve(1.0) 
    show bg title onlayer overlay with Pause(2.0)
    call screen main_menu
Thanks!
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

Post Reply

Who is online

Users browsing this forum: decocloud