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.
And it works. However, the Drag is always placed at (0, 0) and I can't add any attributes without getting an error message, like as or at.
The use of this feature is completely undocumented and there are no examples. Can someone please explain to me how this works or give me example code that I can analyze?
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
The following mostly seems to work. For reference, supplying transforms to a drag using at is not supported even when using screen drags (not Drag()s). Other attributes (like dragged, draggable, etc.) should probably be given in the Drag() definition and not added to the screen directly.
I didn't think of using a block for the as-attribute, thank you.
In your example, you either set the position in the Drag() declaration or with a button. How would I set the position when I create the drag? I want to use the Drag() as a template, but add it at a dynamic position without having to click a button.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
*shrug* tbh not sure, I don't tend to use Drags() much. That said, I haven't really found any reason to need Drags(), since you can always build the drags programmatically if you need to get data from elsewhere. For example: