This is the code of my main menu: it's a live composite, and one of the layers is an image called "scritta" which is the title of the game, in English.
I wanted to change said image with another one with the title in Russian when the player selects the language, and I tried writing this code:
Code: Select all
define gui.main_menu_background = ConditionSwitch(
"persistent.ending == 'True Ending' ",
LiveComposite(
(1920, 1080),
(0, 0), "white.png",
(-300, -300), "lighto",
(0, 0), "blossoms2",
(0, 0), "black main3.png",
(0, 0), "scritta"
),
'not persistent.ending',
LiveComposite(
(1920, 1080),
(0, 0), "white.png",
(-300, -300), "lighto",
(-800, 0), "blossoms",
(0, 0), "blossoms2",
(0, 0), "1.png",
(0, 0), "scritta"
)
)
image scritta = ConditionSwitch(
"lang == 'English'", "gui/scritta.png",
"lang == 'Russian'", "gui/scritta_ru.png",
)
(I also tried the code below from the cookbook https://www.renpy.org/wiki/renpy/doc/co ... ialization, but...nothing)
Code: Select all
init:
if lang == "english":
image bg city = "city_en.jpg"
elif lang == "japanese":
image bg city = "city_jp.jpg"