Animate Images

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
InsanePenguin
Newbie
Posts: 6
Joined: Tue Apr 24, 2018 1:55 pm
Contact:

Animate Images

#1 Post by InsanePenguin »

Hello,
Im running into an issue on renpy - i want to show to images on loop but i keep getting an error in the coding or the second image is just ignored and the game show the next part. Please advise on the code below:

scene vero-a1 animated with fade:
"vero-a2" with dissolve
pause (1)
"vero-a1" with dissolve
pause (1)
repeat

i got it to work once but when i tried to recreate the code with another set of images it would not work

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Animate Images

#2 Post by Per K Grok »

InsanePenguin wrote: Fri Jul 13, 2018 1:35 am Hello,
Im running into an issue on renpy - i want to show to images on loop but i keep getting an error in the coding or the second image is just ignored and the game show the next part. Please advise on the code below:

scene vero-a1 animated with fade:
"vero-a2" with dissolve
pause (1)
"vero-a1" with dissolve
pause (1)
repeat

i got it to work once but when i tried to recreate the code with another set of images it would not work
If you are trying to have an animated background using two images vero-a1.png and vero-a2.png you could do this

define an animated image before the start label

Code: Select all

image bg vero:
    "vero-a2.png"   #if the image is an png
    pause 1            # seems to work equally well with just;  1
    "vero-a1.png"
    pause 1
    repeat
then show the animated background

scene bg vero

If this works add the fade and dissolve. dissolve can be slightly problematic if there is transparency attached to the images, which seams unlikely, as this apparently is a background image.

InsanePenguin
Newbie
Posts: 6
Joined: Tue Apr 24, 2018 1:55 pm
Contact:

Re: Animate Images

#3 Post by InsanePenguin »

Per K Grok wrote: Fri Jul 13, 2018 5:42 am
InsanePenguin wrote: Fri Jul 13, 2018 1:35 am Hello,
Im running into an issue on renpy - i want to show to images on loop but i keep getting an error in the coding or the second image is just ignored and the game show the next part. Please advise on the code below:

scene vero-a1 animated with fade:
"vero-a2" with dissolve
pause (1)
"vero-a1" with dissolve
pause (1)
repeat

i got it to work once but when i tried to recreate the code with another set of images it would not work
If you are trying to have an animated background using two images vero-a1.png and vero-a2.png you could do this

define an animated image before the start label

Code: Select all

image bg vero:
    "vero-a2.png"   #if the image is an png
    pause 1            # seems to work equally well with just;  1
    "vero-a1.png"
    pause 1
    repeat
then show the animated background

scene bg vero

If this works add the fade and dissolve. dissolve can be slightly problematic if there is transparency attached to the images, which seams unlikely, as this apparently is a background image.
I tried to create the image before and after the label - but it still does not show up in the game, it skips to the next scene. Im using jpg - does that matter?

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Animate Images

#4 Post by Per K Grok »

InsanePenguin wrote: Fri Jul 13, 2018 12:39 pm
----
I tried to create the image before and after the label - but it still does not show up in the game, it skips to the next scene. Im using jpg - does that matter?
It sounds to me like there might not be anything in that scene that stops the flow and so the game skips to the next scene.
Try to put in a pause that holds off going to the next scene a while.

Code: Select all

    scene bg vero
    pause 10
create the image before the label. jpg:s should be fine.

Post Reply

Who is online

Users browsing this forum: No registered users