Code: Select all
screen say(who, what):
... # All the other pre-written code unrelated to this.
if show_pointclick2:
use pointclick2()
#end screen say
init -2 python:
show_pointclick2 = False
clicked_on_button = False
screen pointclick2():
# Upon clicking on this button, jump to label button_pressed and change clicked_on_button to true. There might be some redundancy here.
imagebutton auto "gui/renpyicon_%s.png" action Jump("button_pressed") xpos 0 ypos 0 focus_mask True at my_movement clicked [SetVariable("clicked_on_button", True)]
init -2:
transform my_movement:
xalign 0.1 yalign 0.5
linear 10.0 xalign 1.0
linear 10.0 xalign 0.1
repeat
Code: Select all
$ show_pointclick2 = True
h "Try clicking on the button as it moves."
# If the user missed clicking on the moving button, say "too slow" and loop until they do press on it successfully.
while not clicked_on_button:
h "Too slow!"
label button_pressed:
$ show_pointclick2 = False
h "You did it!"
Any help is appreciated!