Is it possible to add an imagebutton here?

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
Nanahs
Veteran
Posts: 310
Joined: Wed Aug 22, 2018 5:50 pm
Contact:

Is it possible to add an imagebutton here?

#1 Post by Nanahs »

So, I'm still stuck on the drag and drop thing :?: hah

I made this code and it's working:

Code: Select all

screen drag:
    zorder 50

    draggroup:
        drag:
            drag_name "pink"
            draggable True
            add "drop.png"

label start:

    scene b
    
    call screen drag
The only thing I want is to add was a function. I wanted to attach an imagebutton together/inside of the "drop" image.
So wherever I dragged the "drop" to, the imagebutton would go together. So the person can place it where they want.

Base on many tutorials I found, I tried something like this:

Code: Select all

screen drag:  
    viewport:
        scrollbars "horizontal"
        child_size (720, 1280)
            
        side_xpos 0
        side_ypos 0
                
        draggable True
        mousewheel True

        add "drop.png"
            
        imagebutton auto "pink.png" xpos 50 ypos 30 action Jump("park") 
But it's giving me errors, saying "not all arguments converted during string formatting".

Does anyone have any idea about it?

This is the project if you want to check: https://drive.google.com/open?id=1ZKZyd ... SETcKhxj2-

ps: the blue square ("drop.png") would be the draggable image. And the pink square would be the imagebutton inside it, that would be dragged together.

Image

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users