Changing Scenes

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
chry3
Newbie
Posts: 5
Joined: Mon Feb 21, 2011 9:15 pm
Contact:

Changing Scenes

#1 Post by chry3 »

Ok sorry second one today. I need help with different scene changes. I have the first scene, but then how do i transition to a different scene?

scene bgstore
init:
image bgstore:
image bgstore = im. Scale("store.jpg", 800,700 )



name "Hey Rei, how's it going?"

r "Nothing much, 'cept for the big test tomorrow."

name "Shoot I forgot. Better hurry home and head for the books."

r "Yeah, you should and don't forget to-"

scene hand
init:
image hand:
image hand = im.Scale("hand.jpg", 800,700)

This is what i have, but the second scene wont show up at all

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

Re: Changing Scenes

#2 Post by Megaman Z »

chry3 wrote:Ok sorry second one today. I need help with different scene changes. I have the first scene, but then how do i transition to a different scene?

Code: Select all

    scene bgstore
    init:
        image bgstore:
        image bgstore = im. Scale("store.jpg", 800,700 )
          
            
    
    name "Hey Rei, how's it going?"
    
    r "Nothing much, 'cept for the big test tomorrow."
    
    name "Shoot I forgot. Better hurry home and head for the books."
    
    r "Yeah, you should and don't forget to-"
    
    scene hand
    init:
          image hand:
          image hand = im.Scale("hand.jpg", 800,700)

This is what i have, but the second scene wont show up at all
A: Code tags. use them for pasting scripts, otherwise the indentation will not be preserved.
B: I don't see any say statements at all after the scene hand statement. When Ren'Py reaches the end of the script, it automatically does a return (or is it an full game reset? I'm not sure offhand), so if you're seeing the main menu when you hit the scene hand statement, that's likely to be what is happening.
C: I would put all the image declaration statements together instead of placing them throughout the script. That way, you're not hunting around in the code to see if you've already declared an image or not.
~Kitsune Zeta

chry3
Newbie
Posts: 5
Joined: Mon Feb 21, 2011 9:15 pm
Contact:

Re: Changing Scenes

#3 Post by chry3 »

what are scene statements? and what are image declaration statements?

chry3
Newbie
Posts: 5
Joined: Mon Feb 21, 2011 9:15 pm
Contact:

Re: Changing Scenes

#4 Post by chry3 »

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 48 of /Applications/Zombies/game/script.rpy: end of line expected.
scene bhand = "store.jpg"
^

Ren'Py Version: Ren'Py 6.11.2b

Sorry im a noob :(


Post Reply

Who is online

Users browsing this forum: Dark79, Ocelot