Image as variable[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
Yuuji
Regular
Posts: 96
Joined: Tue Jan 20, 2015 3:08 am
Location: Russia, Perm
Contact:

Image as variable[SOLVED!]

#1 Post by Yuuji »

Hello! I have an image declared in init block:

Code: Select all

init:
    image Tchi01f_1:
        anchor (0,0)
        pos (500, 300)
        "image/sprites/chi/Tchi01f_1.png"

Is there any way I can use this image as variable? For example:

Code: Select all

#scenario file
$var1 = Tchi01f_1

#screen file
add var1

#or maybe show statement
show var1
I'd appreciate any help.
Last edited by Yuuji on Mon Apr 06, 2015 2:23 am, edited 1 time in total.
There's no point in standing around with your mouth open waiting for talent to fall from the sky. You make your own. No matter what you're doing, the most essential thing is not to give up.

User avatar
Yuuji
Regular
Posts: 96
Joined: Tue Jan 20, 2015 3:08 am
Location: Russia, Perm
Contact:

Re: Image as variable

#2 Post by Yuuji »

Oh, I'm sorry, I got an answer myself.
There's no point in standing around with your mouth open waiting for talent to fall from the sky. You make your own. No matter what you're doing, the most essential thing is not to give up.

Post Reply

Who is online

Users browsing this forum: apocolocyntose