- Jun 2, 2019
- 2
- 0
So, is there some variable or condition that restricts moving objects in Drag&Drop mechanics in RenPy?
Example: I have a chest, I want the player to move things in it without throwing them outside the chest. How do I set an area beyond which the mouse/object cannot be dragged out outside of specific area?
Or, for example, I want to make an interactive scene of climbing a rope using Drag&Drop, where the player drag a hand and moves it strictly vertically along the rope. How can I disabled the movement of a dragged object horizontally and slightly limit it vertically?
I've gone through and tried all the variables in RenPy's official documentation for the Drag&Drop function. The only thing that probably would implement it is `drag_offscreen` with parameters (min_x, max_x, min_y, max_y) where I would specify negative values from the screen edges. But this doesn't work.
Example: I have a chest, I want the player to move things in it without throwing them outside the chest. How do I set an area beyond which the mouse/object cannot be dragged out outside of specific area?
Or, for example, I want to make an interactive scene of climbing a rope using Drag&Drop, where the player drag a hand and moves it strictly vertically along the rope. How can I disabled the movement of a dragged object horizontally and slightly limit it vertically?
I've gone through and tried all the variables in RenPy's official documentation for the Drag&Drop function. The only thing that probably would implement it is `drag_offscreen` with parameters (min_x, max_x, min_y, max_y) where I would specify negative values from the screen edges. But this doesn't work.
Python:
draggroup:
drag:
xpos 0.5
ypos 0.5
draggable True
drag_raise True
drag_offscreen (-500, -500, -500, -500)
frame:
xpadding 20
ypadding 20
text "Test"