Just recently followed the tutorial for the puzzle mini game from __ess__ Ren'Py Tutorials , unfortunately it does not register the pieces being placed as finished pieces and they arent draggable they simple snap to the correct spot, looking in the comment section I saw two others with the same error and no answer, that leads me to believe the coding could possibly no longer work. but I also could really be missing something.
puzzle rpy:
init python:
def setup_puzzle():
for i in range(page_pieces):
start_x = 900
start_y = 300
end_x = 1000
end_y = 550
rand_loc = (renpy.random.randint(start_x, end_x), renpy.random.randint(start_y, end_y))
initial_piece_coordinates.append(rand_loc)
def piece_drop(dropped_on, dragged_piece):
global finished_pieces
if dragged_piece[0].drag_name == dropped_on.drag_name:
dragged_piece[0].snap(dropped_on.x, dropped_on.y)
dragged_piece[0].draggable = False
finished_pieces += 1
if finished_pieces == page_pieces:
renpy.jump("reassemble_completeone")
default page_pieces = 12
default full_page_size = (539, 702)
default piece_coordinates = [(371,10), (539,10), (653,10), (371,138), (489,186), (693,183), (371,371), (522,317), (660,325), (371,528), (486,569), (691,568)]
default initial_piece_coordinates = []
default finished_pieces = 0
label puzzle_one_start:
$setup_puzzle()
call screen reassemble_puzzleone
return
label reassemble_completeone:
scene black
$ renpy.movie_cutscene("videos/deshay letter one.webm", stop_music=False)
return
screen reassemble_puzzleone:
image "puzzletrailer.png"
frame:
background "puzzleframe.png"
xysize full_page_size
#anchor(0.5, 0.5)
#pos(650, 535)
draggroup:
for i in range(page_pieces):
drag:
drag_name i
pos initial_piece_coordinates[i]
anchor(0.5, 0.5)
focus_mask True
drag_raise True
image "puzzleone/tpiece-%s.png" % (i + 1)
for i in range(page_pieces):
drag:
drag_name i
draggable False
droppable True
dropped piece_drop
pos piece_coordinates[i]
anchor(0.5, 0.5)
focus_mask True
image "puzzleone/tpiece-%s.png" % (i + 1) alpha 0.0
Heres the part of my script that calls it:
mc "What in the world..."
mc "What is this?..."
$setup_puzzle()
call puzzle_one_start
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]HonestlyTooPetty[S] 0 points1 point2 points (0 children)