Image Choice Statement Check [CODE] [SOLVED]

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
Meinos Kaen
Regular
Posts: 107
Joined: Wed Jan 04, 2012 1:01 pm
Completed: JPDE - Sonata of Fire
Projects: JPDE, Ars Oratoria, ONHA
Skype: therealmeinoskaen
Location: Somewhere in Italy...
Contact:

Image Choice Statement Check [CODE] [SOLVED]

#1 Post by Meinos Kaen »

Hello there, Meinos Kaen here.

So, I was wondering if there's a way to make RenPy check an Image Choice continuously so that it changes mid-game at the change of the variable.

My code is currently this:

Code: Select all

image Enemy:
    choice (battle == 1):
        "YangBattler"
    choice (battle == 2):
        "Yang Pain"
    choice (battle == 3):
        "WaLang"
Basically, at the change of the variable battle the image also changes but the change only happens when I load the game. Is there a way to make RenPy continuously check this so that I can change it mid-game just by altering the number?
Last edited by Meinos Kaen on Sun Feb 05, 2017 6:40 pm, edited 1 time in total.

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Image Choice Statement Check [CODE]

#2 Post by IrinaLazareva »


User avatar
Meinos Kaen
Regular
Posts: 107
Joined: Wed Jan 04, 2012 1:01 pm
Completed: JPDE - Sonata of Fire
Projects: JPDE, Ars Oratoria, ONHA
Skype: therealmeinoskaen
Location: Somewhere in Italy...
Contact:

Re: Image Choice Statement Check [CODE]

#3 Post by Meinos Kaen »

IrinaLazareva wrote:use ConditionSwitch()
https://www.renpy.org/doc/html/displaya ... tionSwitch
It worked! Many many thanks! :D

Post Reply

Who is online

Users browsing this forum: No registered users