I'm trying to get xpos and ypos of drag by using this script:
Code: Select all
init python:
def Mouse(x):
x=renpy.get_mouse_pos()
return x
init:
default Curr_xpos= Tooltip ('Hey')
default Curr_ypos= Tooltip ('')
$ Curr_x=[]
screen Curr_map_screen:
drag:
drag_name "say"
xpos 600
ypos 600
child "images/Travel_icon.png"
dragged Mouse(Curr_x)
screen Mouse_display:
vbox:
xpos 100
ypos 100
label "[Curr_x]"
label start:
show screen Mouse_display
show screen Curr_map_screen
$ r1=Mouse(Curr_x)
"[r1]"
jump start
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 25, in script
"[r1]"
TypeError: 'int' object is not callable
What am I doing wrong?