Search found 7 matches

by half1-2moon
Fri Apr 05, 2024 12:27 am
Forum: Ren'Py Questions and Announcements
Topic: Help with a "connect the dots" mini game?
Replies: 3
Views: 2281

Re: Help with a "connect the dots" mini game?

I did make a minigame like that for my game Defenders of Adacan - part 1 the Ascent. https://per-k-grok.itch.io/defenders-of-adacan Here is a test of the game built with pygame sH20bFgQlcQ later adopted to run in ren'py. I have a class to draw the lines. I have imported pygame to use pygame.draw.li...
by half1-2moon
Sat Mar 16, 2024 6:28 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to make a draggable item snap back to its original position ?
Replies: 10
Views: 623

Re: how to make a draggable item snap back to its original position ?

it was exactly that, setting the drags with pos instead of align fixed it, and finally all my code is working. thanks a lot, for the documentation too.
by half1-2moon
Sat Mar 16, 2024 1:12 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to make a draggable item snap back to its original position ?
Replies: 10
Views: 623

Re: how to make a draggable item snap back to its original position ?

hello. yes i corrected the default statement for balls_pos. and corrected the indetation and its working. thank you alot jeffster. as for the position of the balls being shifted after the snap i have started a new project, changed the images, i have no margins and no padding on my screens or styles,...
by half1-2moon
Fri Mar 15, 2024 6:00 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to make a draggable item snap back to its original position ?
Replies: 10
Views: 623

Re: how to make a draggable item snap back to its original position ?

i've put them outside the python block and had this error line 21: expected statement. balls_pos = { ^ "ball_1": (0.5, 0.60), "ball_2": (0.25, 0.60), "ball_3": (0.5, 0.85), "ball_4": (0.25, 0.85), "ball_5": (0.75, 0.85), } # Define colors for balls d...
by half1-2moon
Fri Mar 15, 2024 8:21 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to make a draggable item snap back to its original position ?
Replies: 10
Views: 623

Re: how to make a draggable item snap back to its original position ?

thank you, i corrected the indentation and defined colors for the balls like this, but renpy is giving me an invalid syntax for : default colors = { # The function called when a ball is dropped: init python: # Check if a ball color corresponds with the box color if colors[dragged_items[0].drag_name]...
by half1-2moon
Thu Mar 14, 2024 11:01 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to make a draggable item snap back to its original position ?
Replies: 10
Views: 623

Re: how to make a draggable item snap back to its original position ?

thank you so much jeffster for taking the time i appreciate it. i did understand more about the function as you explained it like that. what i changed in my code is that i added define balls_pos and dragged_items[0].snap(*balls_pos[dragged_items[0].drag_name]) to my incorrect condition, so my code l...
by half1-2moon
Thu Mar 14, 2024 8:37 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] how to make a draggable item snap back to its original position ?
Replies: 10
Views: 623

[SOLVED] how to make a draggable item snap back to its original position ?

hello, how to make a draggable item snap back to its original position, when its on the wrong droppable item. so i have four items that are draggable, they are 4 balls. and i have two boxes. and i have the function like this: ( i am not a programmer, i follow some tutorials and i learn) def dragged_...