Layering of Draggroups/Drags

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
diamondbear
Newbie
Posts: 8
Joined: Sun Oct 21, 2018 3:57 pm
Contact:

Layering of Draggroups/Drags

#1 Post by diamondbear »

Hello, first time post here...

I am using the drag and drop functionality for a minigame in my VN. I am using a handful of draggroups each with a few individual drags. All of the draggroups are displayed at the same time, so there is an issue with the layering each of the drag objects. The objects in different draggroups will move under objects in draggroups that were defined afterwards. Basically, I am trying to have the drag object currently being dragged set as the top layer so it will drag over any other objects. Looking at the renpy doc, I can't see anything that explicitly describes this functionality. I see the "drag_raise" attribute, but this only applies to objects in a group.

With all of the interesting implementations of this functionality on the forums, I was hoping someone may have encountered this issue.

Thank you!

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Layering of Draggroups/Drags

#2 Post by Remix »

Did you try:

drag_raise True

as one of the attributes?

Alternatively, drag_name.top() will raise it.

Both fully detailed in docs: https://www.renpy.org/dev-doc/html/drag_drop.html
Frameworks & Scriptlets:

diamondbear
Newbie
Posts: 8
Joined: Sun Oct 21, 2018 3:57 pm
Contact:

Re: Layering of Draggroups/Drags

#3 Post by diamondbear »

Remix wrote: Sun Oct 21, 2018 7:55 pm Did you try:

drag_raise True

as one of the attributes?

Alternatively, drag_name.top() will raise it.

Both fully detailed in docs: https://www.renpy.org/dev-doc/html/drag_drop.html
I have tried both. Both of these methods will raise an object to the top of a drag group well. However, it does not allow me to raise an object in draggroup A above an object in draggroup B. Whatever draggroup was defined first becomes the bottom layer for me currently. Ideally, I can move the draggroup of the selected object to the top layer. From my understanding of the renpy doc, there isn't much talking about how different drag groups relate to each other--just the objects inside of a specifc draggroup.

Thank you for your quick reply!

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Layering of Draggroups/Drags

#4 Post by philat »

diamondbear wrote: Sun Oct 21, 2018 9:32 pmFrom my understanding of the renpy doc, there isn't much talking about how different drag groups relate to each other
Well, because they don't... Why do you need separate drag groups?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Black Spriggan, Majestic-12 [Bot], snotwurm