I have a question...Object snaps back to the left when drag off screen on the right side.

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
BurningTamashi
Newbie
Posts: 10
Joined: Sat Jun 23, 2012 2:13 pm
Contact:

I have a question...Object snaps back to the left when drag off screen on the right side.

#1 Post by BurningTamashi »

I have a problem when i drag an object off screen to the right it snaps back to the left. I just want the object to stay at the very right if drag off screen to the right.

Code: Select all

 screen send_detective_screen:
    xmaximum 720
    ymaximum 720
    
    
    $ xpo = renpy.random.randint(1, 720)
    $ xpo1 = renpy.random.randint(1, 720)
    $ ypo = renpy.random.randint(1, 520)
    $ ypo1 = renpy.random.randint(1, 520)

    
    draggroup:
        ypos ypo
        drag:
            ysize 130
            drag_name "Ivy"
            child "images/ivy.png"
            xpos xpo
    draggroup:
        ypos ypo1
        drag:
            ysize 130
            drag_name "Zack"
            child "images/zack.png"
            xpos xpo1
            
 

BurningTamashi
Newbie
Posts: 10
Joined: Sat Jun 23, 2012 2:13 pm
Contact:

Re: I have a question...Object snaps back to the left when drag off screen on the right side.

#2 Post by BurningTamashi »

it only happens when i drag the object and the mouse goes out of boundaries. PLS HELP


User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: I have a question...Object snaps back to the left when drag off screen on the right side.

#4 Post by PyTom »

This is expected behavior - drags are meant to stay on the screen.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot]