[Solved] Regards Changing Background Scene Using Python

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
andriodmactemporary
Regular
Posts: 27
Joined: Mon Jan 25, 2021 5:35 pm
Contact:

[Solved] Regards Changing Background Scene Using Python

#1 Post by andriodmactemporary »

We could change the background scene with Renpy by using "scene bg image", but how to attain this functionality using Python?

Thanks in Advance.
Last edited by andriodmactemporary on Mon Aug 02, 2021 6:03 am, edited 1 time in total.


andriodmactemporary
Regular
Posts: 27
Joined: Mon Jan 25, 2021 5:35 pm
Contact:

Re: Regards Changing Background Scene Using Python

#3 Post by andriodmactemporary »

Thanks for the reply, but how can I achieve renpy.show(filename) instead of defining "image bg image"

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Regards Changing Background Scene Using Python

#4 Post by hell_oh_world »

i'm pretty sure that you can do that exactly like that, but you need to use absolute path starting from the game/project folder.
i'm might be wrong though.

andriodmactemporary
Regular
Posts: 27
Joined: Mon Jan 25, 2021 5:35 pm
Contact:

Re: Regards Changing Background Scene Using Python

#5 Post by andriodmactemporary »

No, it is not working. I have image "Pic.jpg" in game/images folder I have tried renpy.show("game/images/Pic.jpg"), renpy.show("images/Pic.jpg"), and renpy.show("Pic.jpg") with renpy.scene() before this statement, but it is not showing the image it is only showing the path I entered in renpy.show() function.

User avatar
bonnie_641
Regular
Posts: 133
Joined: Sat Jan 13, 2018 10:57 pm
Projects: Código C.O.C.I.N.A.
Deviantart: rubymoonlily
Contact:

Re: Regards Changing Background Scene Using Python

#6 Post by bonnie_641 »

andriodmactemporary wrote: Sun Aug 01, 2021 12:52 pm No, it is not working. I have image "Pic.jpg" in game/images folder I have tried renpy.show("game/images/Pic.jpg"), renpy.show("images/Pic.jpg"), and renpy.show("Pic.jpg") with renpy.scene() before this statement, but it is not showing the image it is only showing the path I entered in renpy.show() function.

Code: Select all

label start:
    $ renpy.show ("pic")
    "Test 'renpy.show'"
    return
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question. :wink:


Post Reply

Who is online

Users browsing this forum: No registered users