How to show and move image (Displayable) in the middle of screen interaction?

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
derkonstantin
Newbie
Posts: 10
Joined: Wed Jan 25, 2017 9:30 am
Contact:

How to show and move image (Displayable) in the middle of screen interaction?

#1 Post by derkonstantin »

I have a simple script example which create screen, add some buttons with some "stuff" doing by pushing this button.

Code: Select all

init -1 python:

    def some_function():
        # some strange logic

        # ------------------------
        # show image on x1, y1
        # move image to x2, y2
        # hide image
        # ------------------------

        # some other starange logic
        pass

screen tr_tr:
    modal True
    imagebutton idle '1.png' xpos 100 ypos 100 action Function(some_function)
    imagebutton idle '2.png' xpos 500 ypos 100 action Function(some_function)
    if 1>2:
        textbutton "End Game" xalign 0.5 yalign 0.5 action Return()

label l1:
    call screen tr_tr
    jump l1
I want on click buttons call python function with some logic, in the middle of it I want to show some image (Dynamic displayable)(possible with some effects), move it to other coordinate and hide it. Can I do something like that?

Post Reply

Who is online

Users browsing this forum: Google [Bot]