Cannot show animated image using screen?

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
sparkleface
Newbie
Posts: 9
Joined: Mon Dec 25, 2017 12:37 pm
Contact:

Cannot show animated image using screen?

#1 Post by sparkleface »

I have this:

Code: Select all

init -1:  
    image anim:
        "images/one.png"
        pause 0.2
        "images/two.png"
        pause 0.2
        "images/three.png"
        pause 0.2
        repeat 2
        
screen doit:
    add anim xpos 100

# The game starts here.

label start:
    show anim
    show doit
    "Hello"
    return
The result is what you see in the attached image.

The white arrow image is my animated image, and shows up if I use show anim directly. When show doit happens, the blank outline of Eileen shows up, but I wanted my animated image to show up at the specified position.

Can I not add in an animated image through a screen? Or is something wrong with how I set up my code?
Attachments
output
output

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2400
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Cannot show animated image using screen?

#2 Post by Ocelot »

add "anim" xpos 100 IIRC, add expects image name as a string.
< < insert Rick Cook quote here > >

sparkleface
Newbie
Posts: 9
Joined: Mon Dec 25, 2017 12:37 pm
Contact:

Re: Cannot show animated image using screen?

#3 Post by sparkleface »

I changed it to:

Code: Select all

screen doit:
    add "anim" xpos 100
But the result is still the same it seems!

sparkleface
Newbie
Posts: 9
Joined: Mon Dec 25, 2017 12:37 pm
Contact:

Re: Cannot show animated image using screen?

#4 Post by sparkleface »

Okay, it's my bad. Sorry! I was missing the keyword show screen doit. Although it's kinda odd that Eileen just shows up if I didn't have the screen keyword, it kinda threw me off.

User avatar
mitoky
Veteran
Posts: 316
Joined: Sat Feb 07, 2015 9:12 pm
Projects: The Purring Demon's Love, circus eterie
Contact:

Re: Cannot show animated image using screen?

#5 Post by mitoky »

sparkleface wrote: Mon Dec 25, 2017 6:47 pm Okay, it's my bad. Sorry! I was missing the keyword show screen doit. Although it's kinda odd that Eileen just shows up if I didn't have the screen keyword, it kinda threw me off.
As far as i know, the Eileen image shows up when the image, which is shown, doenst exists or cant be found.

Post Reply

Who is online

Users browsing this forum: Google [Bot]