How to transform an image added to a 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
zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

How to transform an image added to a screen?

#1 Post by zeroTheHero »

My code:

Code: Select all

transform slowmove:
    linear 5 xalign 0.85 yalign 0.06 
    linear 4 xalign 0.83 yalign 0.08
    linear 5 xalign 0.8 yalign 0.05 #back to initial position
    repeat
    
#screen
default ami = "Talk"
screen ami_1:
    zorder 5
    vbox:
        xalign 0.80
        yalign 0.05
        # xysize (250, 180)
        showif ami=="Talk":
            add "talk2.png": 
                size (420, 315)
        showif ami == "madRush":
            add "Rush_2.png": 
                size (450, 350)
                ... #continues to other conditions
label start:
	show screen ami_1
	ami "Now I talk"
	$ami == "madRush"  #Want to add a transform here
	ami "Now I run"
What I want: I want the slowmove transform applied (by default if possible) to all the images in screen ami_1. Also, can I have more than one transform applied to an image at the same time?
I tried using $renpy.transition(slowmove) but it didn't do anything. I'm wondering if At() can be used here, like Function(At()) but the documentation says At() accepts only images?
Another idea is can I define image Talk = "talk2.png" and give it transform slowmove, and when I add it to the screen I add Talk and not the image?

Thanks for listening!

zeroTheHero
Regular
Posts: 64
Joined: Mon May 07, 2018 10:49 am
Contact:

Re: How to transform an image added to a screen?

#2 Post by zeroTheHero »

heeeeelp XD I'm starting to think it's impossible to transform images added to a screen like this

Post Reply

Who is online

Users browsing this forum: No registered users