Old Image is fading in a few Seconds before new image

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
amaturemanga
Regular
Posts: 97
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

Old Image is fading in a few Seconds before new image

#1 Post by amaturemanga »

Hey everyone i just finished putting in my first menu choice in my game however i'm having a little problem when the player chooses the first choice "Listen to Saki, and make your own breakfast" a little dialogue goes on after the choice is made and it dissolves transitions into my livingroom.jpg image for the living room scene however my old wake2 image appears on the screen for a few seconds before it dissolves again into my living room image and the music isn't playing. I'm not sure what i did wrong here is script code any ideas i'm completely confused on why this is happening

script

Code: Select all

# You can place the script of your game in this file.
init:
    $ g = Character("???", show_two_window=True)
# Declare images below this line, using the image statement.
image mainmenu = "hypnotic_student.png"
image ctc_animation = Animation("ctcarrow01.png", 0.2, "ctcarrow02.png", 0.2, xalign=0.9, yalign=0.9)
image ctc_animation2 = Animation("ctcarrow03.png", 0.2, "ctcarrow04.png", 0.2, xalign=0.9, yalign=0.9)
image ccbackground = "cc_background.png"
image firstscene = "hallway.jpg"
image secondscene = "path.jpg"
image thirdscene = "slapbackground.jpg"
image wakeup1 ="blur.jpg"
image wakeup2 = "unblur.jpg"
image Saki impatient = "saki1.png"
image Saki surprised ="saki2.png"
image Saki mad1="saki3.png"
image Saki blush="saki4.png"
image Saki annoyed="Saki5.png"
image breakfast="kitchen.png"
image Saki confused="Saki6.png"
image livingroom="livingroom.jpg"

# Declare characters used by this game.
define story = Character(None, kind = nvl, ctc = None)
define g = Character("???", show_two_window=True, ctc="ctc_animation2", ctc_position="nestled")
define player = Character("[playername]", show_two_window=True, ctc="ctc_animation2", ctc_position="nestled")
define s = Character("Saki Itsuka", show_two_window=True, ctc="ctc_animation2", ctc_position="nestled")
define fastdissolve = Dissolve(0.2)
define fastblinds = ImageDissolve(im.Tile("blindstile.png"), 0.2, 8)
define mediumblinds = ImageDissolve(im.Tile("blindstile.png"), 0.5, 8)
# The game starts here.
label splashscreen:
    scene black 
    $ renpy.pause(1)
    
    show text "The following story is a work of fiction and contain fantasy situations and does not reflect hypnosis in real life" with dissolve
    $ renpy.pause(2)
    
    hide text with dissolve
    $renpy.pause(1)
    
    $ renpy.pause(1)
    
    show text "AmatureManga Productions Presents\na story by: AmatureManga   and   Art by: SilverKazeNinja" with dissolve ## fix
    $ renpy.pause(2)
    play music "Metaphysik.mp3"
    hide text with dissolve
    $renpy.pause(2)
    
    $ renpy.pause(2)
    
    show text "Character Sprites By: AmatureManga"with dissolve ## fix
    $ renpy.pause(2)
    hide text with dissolve
    return ## fix
    
label start:
    stop music
    play music "Necropolis.mp3"
    with dissolve
    scene ccbackground
    call screen character_customization_screen
    $ story = Character(None, ctc="ctc_animation", ctc_position="fixed", kind=nvl)
    with dissolve
    
    window show dissolve
    $ playername = renpy.input("Please enter your character's name below.")
    $ playername = playername.strip()
    if not playername:
        $playername = "Flayer Yu"
    window hide dissolve  
    stop music
    
$renpy.pause(1)    
show firstscene with dissolve
play music "Fallen Angels.mp3"
story "I am walking down a dark corridor. It is a corridor I am intimately familiar with."
story "This is a dream I have almost every night."
story "I can feel the darkness. A cold chill runs up my spine; hair standing on end, skin engulfed in goosebumps."
story "I know what lies ahead. I have seen it more times than I dare to remember."
story "Every fiber in my being is screaming for me to stop, to turn back and flee."
story "But I know..."
story "I know I cannot because this is a dream."

nvl clear 
window hide fade

show secondscene with dissolve 
story "I hesitantly turn the corner, knowing that resistance is futile, and find myself in front of that same damn door."
story "Dread fills me as I reach for the doorknob. I would rather not, but I know my only option is to move forward."
story "The door opens to a familiar, dark, abandoned room."
story "I step gingerly onto to the familiar stone-colored carpet."
story "Nausea tries to overcome me as I see the familiar blood stains on the carpet."
story "But it doesn't end there; I can feel the familiar wooziness as I see the blood staining the wall in a deep red, oozing into every crack, every contour, of these old, wooden walls."
nvl clear
window hide fade(2)

story "But I know what I must do, as I have seen this dream many times before."
story "But it never gets any easier."
story "I look over to the two badly painted doors I know await me in the center of the room."
story "I read the familiar signs on each of the doors: one says 'Hero', the other says 'Villain'."
story "Even though I've never been past either of these doors, I know somehow, that something terrible lies beyond those doors."
story "However, that terrible something is also an amazing something."
story "I find it disconcerting that I'm still not sure how I know that."
nvl clear
window hide fade

story "Regardless, I can only go through one of the two doors, so I stop a moment, consider my options with what little information I have been allowed."
story "I gulp and make my decision."
story "Slowly, hesitantly, I make my way over to the door I have chosen, and grip the knob tightly."
story "But, just as I start to turn the knob..."
nvl clear
window hide fade
stop music
$renpy.pause(1)
g "\"WAKE UP YOU STUPID IDIOT!!\"" 

scene thirdscene 
show thirdscene
play sound "SLAP.mp3"
$ renpy.pause()

scene wakeup1 with dissolve
show wakeup1 
play music "Two Finger Johnny.mp3"
player "\"Uuugh... Man, that hurt.\""
story "I slowly sit up on my bed, feeling a warm, pulsing pain in my red cheek."
story "Rubbing it, i look to my right and i see that familiar impatient girl..."

show wakeup2 with dissolve
show Saki impatient with fastblinds
s "\"Seriously, you know you're really pathetic, right? You need to start getting up on your own..\""
nvl clear
window hide fade

player "\"Haha! Like you're one to talk. Correct me if I'm wrong, but wasn't it just the other day that I had to wake you up?\""
hide Saki impatient with fastdissolve
show Saki surprised with fastdissolve
s"\"Huh?\""
hide Saki surprised with fastdissolve
show Saki mad1 with fastdissolve
s "\"I-Idiot!\""
hide Saki mad1 with fastdissolve
show Saki blush with fastdissolve
s"\"Hmph! Idiot. You know very well that I was sick that time.\""

story "Meet Saki Itsuka. My impatient next door neighbor and childhood friend."
story "About a year ago, my parents got a job offer in America."
story "It was a really good deal and they couldn't pass it up, but I wanted to stay in Japan."
story "Luckily, Saki's family offered to keep an eye on me while my parents are away."
story "Saki's been coming over everyday to help me out around the house ever since, though she'd never admit it to anyone."
story "She's like that; very proud and very protective of her reputation."
nvl clear
window hide fade

player "\"Hehe, careful now. That attitude is gonna make you fat someday.\""
hide Saki blush with fastdissolve
show Saki annoyed with fastdissolve
s "\"Hey! What's that suppose to mean? Are you trying to get me to hit you again?\""
player "\"Oh, come on, Saki. You know i'm just trying to mess with you.\""
hide Saki annoyed with fastdissolve
show Saki blush with fastdissolve
s "\"Yeah, yeah, just hurry up and get up already. We're going to be late for class at this rate.\""
hide Saki blush with fastblinds
story "Hesitantly, I leave the warm comfort of my bed and stretch. "
story "Evidently, this is not expedient enough for my childhood friend, who pushes my back to get me to hurry up."
nvl clear
window hide fade

hide wake2
stop music
show breakfast with mediumblinds
play music "Feelin Good.mp3"
player "\"I know, I know, I'm hurrying. Would you quit pushing me already?\""
show Saki impatient with fastblinds
s "\"[playername]...I don't care what you say, just hurry up and make your breakfast already. I don't want to be late to class again"
story "Saki...i see your just as much of a dictator as you've always been." 
story "I think to myself as i step into the kitchen to prepare breakfast." 
story "But then, as i begin my normal routine to make my breakfast,"
story "AS SAKI ORDERED BY THE WAY!!"
story "A strange thought pops into my head..."
nvl clear
window hide fade

hide Saki impatient with fastdissolve
show Saki confused with fastdissolve
s"\"Hmm? What's wrong [playername]\""
player "\" Oh it's nothing, i just have alot on my mind right now\""
hide Saki confused with fastblinds
story "Yeah, there's no way i could tell her what i'm thinking about right now."
story "I better listen to her and get started on breakfast now..."
story "HOWEVER... i could try and see if i can convince her to make my breakfast for me."
story "But if it doesn't work then i have to face the dragon's rage again"
story "Brrrrr...i shiver just thinking about it."
story "So now i have to make a decision"
nvl clear
window hide

stop music fadeout 1.0
story "I..."
nvl clear
window hide

menu:
    "Listen to Saki, and make your own breakfast":
        jump breakfastheroscene
        label breakfastheroscene:
        story "Yes, that's right what am i thinking?"
        story "The last time i suffered the dragon's rage i ended up the hospital"
        story "A trip to the hospital...THAT I WILL HAVE TO PAY FOR...is not worth a free breakfast."
        nvl clear
        window hide
        hide breakfast with dissolve
        
        jump livingroomheroscene
        label livingroomheroscene:
        show livingroom with dissolve
        story "After making my breakfast, Saki walks over to the living room as i finish getting my stuff ready to leave"
        play music "Carefree.mp3"
    "Convince Saki to make your breakfast":
        jump breakfastvillainscene
        label breakfastvillainscene:
        story "Hehehe...Yes that's right, she did hit me afterall."
        story "It's time i fought back, from all the times she's picked on me in the past."
        story "I am a guy afterall, not a wuss. I am not going to let Saki torment me like this anymore."
        story "Besides if choose the correct words i won't have to suffer the dragon's rage."
    
    
        
  
   
    

return
    

novalyssa
Newbie
Posts: 10
Joined: Fri Jul 03, 2015 4:40 pm
Contact:

Re: Old Image is fading in a few Seconds before new image

#2 Post by novalyssa »

Not sure if you have solved this problem already, but is it because the image is defined as "wakeup2", not "wake2"? You wrote the code "hide wake2", when it should (I think) be "hide wakeup2". :-)

User avatar
Winterslice
Veteran
Posts: 230
Joined: Mon Sep 28, 2015 3:51 am
Completed: The Next World, Golem Creation Kit
Organization: Illuminated Games
Contact:

Re: Old Image is fading in a few Seconds before new image

#3 Post by Winterslice »

If you haven't already figured this out, I'm pretty sure the image problem is because you're using window hide fade when you should be using window hide dissolve, followed by: hide wake2 (or wakeup2, as novalyssa pointed out) with fade

Post Reply

Who is online

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