Let me explain first what I'm trying to do. My idea seems pretty simple, but since I'm a total noob to renpy + python, it's pretty hard for me. Maybe you can help me with that, I would appreciate it.
All I want to do, is to make background images draggable ingame (with limits based on the maximum size of the used image, so that the image can't be dragged over the borders of the image [image size > screen size]), while the story can continue by pressing space ONLY or something like that (not by mouseclick, because it's needed for dragging).
I tried something like this:
///////////////////////////////////////////////////////////////////////////////////////////////////////
Code: Select all
#Define Pictures
image bg draggablePicture0001_WorldMap = "draggablePictures/0001.jpg"
# [heres some relevant code]
init:
# [heres some other relevant code]
label draggablePicture1:
scene bg draggablePicture0001_WorldMap at Position(xpos=0.5, ypos=0.5, xanchor=0.5, yanchor=0.5, draggable=True) with fade
"Mind" "I can drag the map to explore the world."
"Mind" "Hm? Wait... What?"
"Mind" "Whoops... The picture showed up, but isn't draggable... I'm such a noob."
return
With help of this: https://www.renpy.org/doc/html/drag_drop.html
I managed to make the narrator-box draggable by editing the say screen... which wasn't even my intention, but I can't make background screens draggable.
Alternatevily I thought about to try to make background screen images controllable with the arrow-keys, for the same reasons, but here I failed too.
I'm sorry to annoy you with such a question, but I would really appreciate your help. Thanks in advance.
EDIT: In another attempt I tried to make an interface with ui.imagebutton to have realtime control over the background picture... I achieved to reposition the background image, when I copy it into the say screen as imagemap... but then I have no soft movement control... I can just "teleport" from one side to the other.
There must be a way to have realtime-control over the background image-position and movement... Or not?
EDIT2: Well yeah... guess you guys don't have an idea, huh?