Ren'py Drag and Drop Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024

ความคิดเห็น •

  • @dralithi
    @dralithi 11 หลายเดือนก่อน +32

    Drag ideas:
    1. A magnifying glass that magnified what was under the "lens"
    2. A towel that could wipe away steam on a mirror or something covered in dust.
    3. A fingerprint brush to search for hidden fingerprint clues.
    4. A UV lamp that showed clues (like dried blood or a secret message)

  • @duckcluck123
    @duckcluck123 2 ปีที่แล้ว +101

    Seriously, you make the most high quality and entertaining videos about renpy that I've seen on TH-cam. It's really motivating me to keep working on my game :)

    • @vimi
      @vimi  2 ปีที่แล้ว +4

      Thank you! Keep working on your game!!!

    • @BCardician
      @BCardician ปีที่แล้ว +2

      Truth

    • @chaennelchaennel
      @chaennelchaennel 4 หลายเดือนก่อน

      Totally agree!!!💓

  • @igretrovods9189
    @igretrovods9189 2 ปีที่แล้ว +43

    I’m definitely rewatching all those videos multiple times and pausing every 30 seconds to comprehend. It’s simple and yet complex. All those functions are truly game changers. Thank you for sharing

    • @vimi
      @vimi  2 ปีที่แล้ว

      Thanks!

  • @vonkku
    @vonkku 5 หลายเดือนก่อน +4

    I'm not even planning on making a RenPy game, I just watch these for fun and try to understand, even though my English is not the best :D

  • @sakoshiro9610
    @sakoshiro9610 2 ปีที่แล้ว +43

    I had no idea that renpy had such a cool functionality, you seriously help so much with everything that you do!

    • @vimi
      @vimi  2 ปีที่แล้ว +2

      Yay! I'm glad to hear that!

    • @chaennelchaennel
      @chaennelchaennel 4 หลายเดือนก่อน

      Yeahhh, I’m so grateful too🥹💓💓

  • @tfw_thevoid
    @tfw_thevoid 2 ปีที่แล้ว +17

    omg this is AMAZING. I've been wanting to do a VN that had a crafting system and every person I spoke to made it seem like it was nigh impossible and here's the drag and drop feature just...existing. Thanks so much for this!

    • @vimi
      @vimi  2 ปีที่แล้ว

      Awesome!

  • @floralzero
    @floralzero 2 ปีที่แล้ว +3

    i am already pogged at Regular Brain- THE TEXT MOVES

  • @Plantgrowth
    @Plantgrowth 2 ปีที่แล้ว +19

    Damn. This is pretty neat stuff. Would love to see in-depth tutorials and examples on dragging too. Such as opening curtains to see what's behind them and so forth. But this is already super helpful.

    • @vimi
      @vimi  2 ปีที่แล้ว

      I like to use my Ren'py Cookbook series for those sorts of thing - a bunch more of those are in the pipeline, so keep an eye out!

  • @codemonkey5519
    @codemonkey5519 2 ปีที่แล้ว +15

    Another absolute banger. You have no idea how much you're helping my game out!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      That's great to hear! I'll TRY to imagine how much I'm helping!

  • @messymoonmess
    @messymoonmess 2 ปีที่แล้ว +2

    Seriously I didn't see the potential of drag and drop system until you showed your exemples !!! Thank you sm I have so many ideas now !!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      It's really an underutilized feature!

  • @jyc8291
    @jyc8291 2 ปีที่แล้ว +9

    Outstanding tutorial as usual, mixing both the technical part of the subject and your thoughts about how to take advantage of it in a narrative. Hats off once again!

    • @vimi
      @vimi  2 ปีที่แล้ว

      🎩😃

  • @tonywtyt
    @tonywtyt ปีที่แล้ว +2

    This is the second time I've come to investigate Ren'py, because I'm interested in how to go beyond the fundamental, boring, way of approaching the UI, question-answer, multiple choice-pick, scenarios. Your videos always pop up in the list and I've loved them. There's another author that shows how to build the logic for a character creator system that's amazing. I really appreciate these shares!

    • @vimi
      @vimi  ปีที่แล้ว

      Thanks!

  • @unciervoenciervado
    @unciervoenciervado 2 ปีที่แล้ว +3

    Its so cool, we will try to implement it. Since my favourite VN ever (Va11-Hall-A) centers the game around this particular mechanic.

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      Awesome!

  • @heus.correia
    @heus.correia 2 ปีที่แล้ว +1

    Just found your channel while working on a project, wonderful quality and content, thank you for taking your time to work on it ❤

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      Thank YOU for taking the time to watch my videos!

  • @Katy133
    @Katy133 2 ปีที่แล้ว +1

    This is SO AWESOME, thank you so much for making this tutorial! I've been really wanting to learn about drag and drop programming in Ren'Py.

  • @pgasnow
    @pgasnow 2 ปีที่แล้ว

    THANK YOU SO MUCH. I can't even begin to express how grateful I am for this tutorial. I'm working on a VN in Ren'py that involves a part (or perhaps a minigame) in which you have the option to move birds around and today I was finally able to implement this.
    I was inspired by the code in your video (to which I made some minor tweaks and added some pictures of birds i took myself) to keep working on it until I finally got it right.
    I started moving the birds around a bit myself for a youtube video I uploaded and afterwards I continued to move around those birds on the screen for HOURS. It was so satisfying, an almost childlike sense of joy overcame me. This wouldn't have happened without the inspiration I found with this video (and i haven't even tried the "drop" part of "drag and drop" yet). thank you

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      OH! I saw this video!!! I'm so glad I inspired you! Keep at it!

  • @vtubereats873
    @vtubereats873 2 ปีที่แล้ว +1

    Really nice tutorials! It's nice to see high-quality content about Renp'y, keep up the great work!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      Thank you! I'll keep at it!

  • @JuleSan_jk
    @JuleSan_jk 2 ปีที่แล้ว +2

    Epic chapter meme names XD Thank you so much for this video!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      i put waaaaay too much time into the chapter titles, so I'm glad you appreciate them!

  • @EriksBlue
    @EriksBlue 2 ปีที่แล้ว +2

    Thank you for this video, it inspired me to conceptualize some interesting drag/drop ideas for my game.

    • @vimi
      @vimi  2 ปีที่แล้ว

      Nice! I'm glad this video gave you some idea fuel!

  • @chibrina
    @chibrina 2 ปีที่แล้ว +1

    This channel is such a hidden gem, hope you blow up

    • @vimi
      @vimi  2 ปีที่แล้ว

      🙏Thank you!

  • @rogerricciardulli4425
    @rogerricciardulli4425 9 หลายเดือนก่อน +1

    I was exactly looking for something like this, thank you!!! amazing video

  • @KerrinMmm
    @KerrinMmm 3 วันที่ผ่านมา

    Very punny at the end :D. Thanks for the tips and tutorial!

  • @Sarathewise158
    @Sarathewise158 ปีที่แล้ว +1

    Having to shove the girl feels vile lmao I definitely wouldn't be able to make that choice if it was in a tactile format. My friends and I used to play escape room games over vc and having to collect and then drag components into puzzles always felt really good, especially when you would spend a bunch of time dragging the component places it wasn't supposed to go and then finally found the place where it was and unlocked something new. Personally, I'm thinking of creating a game that requires you to ask the right questions to certain characters to learn more about the world it's set in, so being able to take objects to them and have them comment seems like a fun way to use this system and introduce some interactability. Thank you for the tutorial! Cheers!

  • @anthonyschwartz1084
    @anthonyschwartz1084 2 ปีที่แล้ว +1

    Really appreciate the break down! Hopefully I can find use in the VN once I have the dialogue all written lol

  • @OneWingedRose
    @OneWingedRose 2 ปีที่แล้ว +1

    Card games!
    Lol, you mentioned some other cool ideas here too I hadn't thought of, but my immediate thought for this feature is card games :D.
    Thanks for the cool video!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      Card games would work! That would be a GREAT application for this!

  • @nieldak
    @nieldak 2 ปีที่แล้ว +1

    I love your content. I'm learning ren'py to create an educational game and your videos really help me to understando what I can do or not. =) Thanks a lot!

    • @vimi
      @vimi  2 ปีที่แล้ว

      You're welcome!

  • @TheHASgamers
    @TheHASgamers 2 ปีที่แล้ว +1

    This series is so useful. Keep it up!

    • @vimi
      @vimi  2 ปีที่แล้ว

      I've got a few more tutorial videos in me!

  • @Sandra-ei9zl
    @Sandra-ei9zl 2 ปีที่แล้ว +1

    Thank you so much!! I was wondering how to do such thing for a long time

    • @vimi
      @vimi  2 ปีที่แล้ว

      Glad I could help!

  • @santibang8764
    @santibang8764 2 ปีที่แล้ว +2

    Just pressing the like button is too cold. That's why, hey! Thanks for the video, it really helped me with a project!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      Glad I could help!

  • @user-ge1hu2zm1b
    @user-ge1hu2zm1b 4 หลายเดือนก่อน

    Thanks for making these videos, very helpful

  • @bignerdoncampus4527
    @bignerdoncampus4527 11 หลายเดือนก่อน +1

    Please do a video explaining how to make a card game with Renpy, including common card game mechanics like shuffling the cards.

  • @dralithi
    @dralithi 11 หลายเดือนก่อน +3

    Finally, now I can make Rupaul's Drag Race into a novel

  • @jenqui4505
    @jenqui4505 2 ปีที่แล้ว +1

    Wow! Thank you so much for this!

    • @vimi
      @vimi  2 ปีที่แล้ว

      You're welcome!!!

  • @TYMeDUST
    @TYMeDUST 2 ปีที่แล้ว +1

    Thanks so much for this!! :D Love your videos, so inspiring.
    Also, subscriber #1000! (At least it looks that way from my screen!) :) Keep up the awesome work.

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      Thank you! And yeah, I'm absolutely stoked to hit 1000!!!

  • @SG7Music
    @SG7Music ปีที่แล้ว +1

    Years ago I was trying to figure out how to have a shooting minigame, this will solve that issue!
    Thanks for making these videos!

  • @Ria_NT
    @Ria_NT 2 ปีที่แล้ว +1

    DRESS UP GAME
    Great video, btw!

    • @vimi
      @vimi  2 ปีที่แล้ว

      LOL! Now I wanna find a Ren'py game that does this! Or...do it myself???

  • @lexlenard4663
    @lexlenard4663 2 ปีที่แล้ว +1

    its actualy usefull when you're making a puzzle type game.

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      I absolutely love how tactile it makes puzzles feel!

  • @zanderford4179
    @zanderford4179 2 ปีที่แล้ว +1

    needed this

    • @vimi
      @vimi  2 ปีที่แล้ว

      Glad to help!

  • @polishguy3414
    @polishguy3414 2 ปีที่แล้ว +1

    Really greatfull i found this channel, great video.

    • @vimi
      @vimi  2 ปีที่แล้ว

      I'm really grateful you found this channel too!

  • @steamycarafe
    @steamycarafe ปีที่แล้ว +1

    Some parts of this video may be outdated. Code similar to code in the video at 3:38 gets NameError : name 'draggable' not defined.

    • @vimi
      @vimi  ปีที่แล้ว +2

      That error messaging sounds like the drag_name wasn't defined in the drag screen like you can see at 1:51 .

  • @ryeryebread2000
    @ryeryebread2000 ปีที่แล้ว +1

    Thank you so much for these videos! I am trying to figure out how to implement this into a spell casting system, which is basically just crafting. I want the player to drag "runes" to a certain spot, in a certain order, so I have been trying to take this video and make the former using if statements. And I am utterly failing! There is another tutorial series that talks about a crafting inventory system, but I am coding impaired and its hard for me to follow. Your tutorials are awesome, especially for an artist like me trying to add some functionality and gameplay to my VN! I didn't know if you have any recommendations on how to go about creating it with the code from the video from as a launching point. Thank you so much!!

  • @jagogamesyt
    @jagogamesyt ปีที่แล้ว +1

    drag and drop is 👌

  • @chaennelchaennel
    @chaennelchaennel 4 หลายเดือนก่อน +1

    I have a question, more than an idea(🤣):
    let’s say we are making a gardening scene and we want our players to move their hands + pick a vase with topsoil in it + drag it around a tree (and, the moment they pick it, the image of the vertical vase changes to a horizontal one with topsoil falling to the ground + they can only drag it following a pre-established perfect circular shape.
    How do we do all of that?

    • @vimi
      @vimi  4 หลายเดือนก่อน +1

      Lots of different ways that all have their own advantages and disadvantages.
      Before you get to deep into what you "ideally want" though, you'll want to establish what you "need". Yes, you could create a custom cursor that activates when you press a button, and then create several more screen buttons with new hover states that permanently change when you hover over them in sequence, OR, you can make the user drag and drop one batch of dirt at a time, which requires way less code.
      The best solution is often the simplest, because the more complicated you make something, the more opportunities it has to break on you.

    • @chaennelchaennel
      @chaennelchaennel 4 หลายเดือนก่อน

      @@vimi thank you so much for taking in consideration my question!!🥺💓 I’ll take the best from your suggestion, I appreciate it, truly, thank you again🥹💓

  • @miskliy1
    @miskliy1 2 ปีที่แล้ว +2

    Amazing, hope you grow dude, you are great explaining. Would love to assist to a course of yours.

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      I'll probably need some help at some point lol
      Gotta get back to dev work soon!

  • @exiscoming5509
    @exiscoming5509 2 ปีที่แล้ว +1

    It's a really solid start, but I would like to see a follow-up tutorial on the more complex features.
    The demos you showed are amazing, but I'm struggling to re-create them.

    • @vimi
      @vimi  2 ปีที่แล้ว

      Are there any particular aspects you're consistently having trouble with?
      I included the code I used in a github link in the description, if that's any help!

    • @exiscoming5509
      @exiscoming5509 2 ปีที่แล้ว +1

      @@vimi Hey, sorry for the late reply. So here's what I tried to do:
      >Click and drag a herb to a bowl and drop it in.
      >I wanted the herb to light up when dragged
      >I wanted the bowl to light up when hovered over it with the herb.
      Turns out... not as easy as I thought! Eventually got help via the Renpy Discord. It never turned out exactly the way I wanted it, but it's close, so I'm quite happy =)

  • @saturn5812
    @saturn5812 2 ปีที่แล้ว +1

    It's so cool! Thanks

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      No prob!

  • @meaganchan2088
    @meaganchan2088 2 ปีที่แล้ว +1

    Ty! This was really helpful for me during this game jam i'm in rn! But, quick question: which file are we supposed to use for the code? The script.rpy, screen.rpy, or something else?

    • @vimi
      @vimi  2 ปีที่แล้ว +3

      The short answer is "script.rpy".
      The long answer is "anywhere; ren'py starts your game at label start, and after that, as long as you make sure your game jumps or calls other labels and screens, you can really put your code anywhere. I end up adding a ton of extra rpy files just to split everything up into manageable chunks for later! "

  • @CyberTokyo_
    @CyberTokyo_ 8 หลายเดือนก่อน

    Thank you so much for this video. Really helped me out with my project. I have one question, how do you prevent the dialog from continuing if the drag&drop screen is showing? and how to continue the dialogue after the drag and drop is closed?
    This is the code I have:
    eileen "hey there!"
    show screen dragNDropTest with dissolve
    eileen "how are you?"
    the eileen dialogue keeps on playing when the drag and drop screen is open

  • @Altaranalt
    @Altaranalt ปีที่แล้ว +2

    Would it be possible to link the code you used to the stabbing Caesar bit? I'm trying to do something similar, but I'm struggling to get it done.

    • @vimi
      @vimi  ปีที่แล้ว +1

      That one I faked with a screen record!
      But if you wanted to make something like that, it would be a simple screen where the knife is the draggable object, and make Caesar an image that changes depending on a variable that changes when you drop the object on to him.

  • @AlexanderArts
    @AlexanderArts 3 หลายเดือนก่อน

    This helped a lot, but there's one more thing I can't figure out how to do; Play a sound when a Drag is clicked. I guess you need some python code to do it...

  • @emanuele4678
    @emanuele4678 ปีที่แล้ว +2

    Hello 👋🏼👋🏼I'm slowly seeing your videos which I'm finding really useful. In particular on the drag and drop question I wanted to ask you something: I currently have an object x which combined with object y creates object z. Until here it's ok but then I would like to make object z an imagebutton to jump in a new path and sincerely i wouldn't know how to do it ...do you have any advice ?🫤

    • @vimi
      @vimi  ปีที่แล้ว +1

      You can do it in a few different ways depending on your specific needs. As a little hint, you can put if/else statements inside of some definitions of objects.
      So instead of add "image.png", maybe you can say "add" and then make that an image defined earlier, that has an if/else statement inside that changes the image if a variable changes.
      So you could make both items X and Y so they have default images, but when you combine them, set off a variable that changes the image of item X to the new item as a hyperlink, and hides item Y.
      There's a few other ways you can handle it, but being able to define images, functions, and other variables with if/else statements will probably be a huge part of whatever you go with!

  • @bedgosh9810
    @bedgosh9810 4 หลายเดือนก่อน +1

    I got a question regarding drag function. Can I use it to allow the user to only move the object in one axis? Let's say its x axis. I intended to use it for a minigame where you simply move an object in fixed time interval.

    • @vimi
      @vimi  3 หลายเดือนก่อน +1

      I don't think so. You might be better off using a bar with most of the displayables turned off except for the thumb displayable.

  • @aldocampos1153
    @aldocampos1153 ปีที่แล้ว +1

    It's amazing what you do and I don't have words to say anything that hasn't been said in the comments! But I have a question, how could I place two "draggable" elements in a "droppable"?

    • @vimi
      @vimi  ปีที่แล้ว +1

      I'll have to double check later, but I think that can be done by default!

    • @aldocampos1153
      @aldocampos1153 ปีที่แล้ว

      @@vimi Thanks for your answer!! I'll try to do some testing on my side too

  • @OneWingedRose
    @OneWingedRose ปีที่แล้ว +1

    Do you know how to call on a Drag's properties?
    Like, if I want to make an if statement where "if circle's xpos is greater than 500" (cuz it's dragged that far from its starting xpos of 100 by the player), "e "xpos is greater than 500!"" or something?
    Every if statement I make trying to use circle's properties comes back with an "undefined" error :(

  • @TheGhwez
    @TheGhwez 9 หลายเดือนก่อน +1

    I copied and pasted your same code into renpy 8.2.0 and i got this error:
    NameError: name 'droppable' is not defined
    i'm using the latest version of atom
    please it would be amazing if you told me how to fix this, i really want to know how to make use of this great drag n drop function

  • @dralithi
    @dralithi 11 หลายเดือนก่อน

    Dragon Drop sounds like a video game

  • @scotthunsinger7861
    @scotthunsinger7861 2 ปีที่แล้ว

    Love the channel! I saw a vague suggestion that the drag/drop system might be able to be used to act as a collision detection system. I was wondering if you had thoughts on how that might be possible? I'm thinking maybe, big IF, the draggable "item" was already in motion and were to "collide" with the droppable item, some defined action takes place (call function or add to score, etc...). IF that were possible, things could get more interesting with more moving pieces, but just as a simple example, do you know if something like that would be possible?

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      I'm working on a system like this right now, and I don't think drag and drop is the pathway to the solution.

    • @scotthunsinger7861
      @scotthunsinger7861 2 ปีที่แล้ว

      @@vimi Oh sweet, I'm very interested in seeing what you come up with. I'm expanding my understanding and knowledge every day and collision detection is the next hurdle for me. Your videos are a huge help for me.

  • @Dizzydizzydizzy7
    @Dizzydizzydizzy7 2 ปีที่แล้ว +1

    Hi, keep up the good work!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      🥰👍

  • @vatosflokos3290
    @vatosflokos3290 2 ปีที่แล้ว +3

    What software did you used for the creation of characters in romancing flesh? It looks like still images that are somehow animated.

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      I used Photoshop for the image composites, and then animated them in Live2d, with lots of meshes!

  • @TainedTastebuds
    @TainedTastebuds 2 ปีที่แล้ว +1

    Great video, thank you so much! I just have a quick question: I'm trying to make a word bank mini game where you drag words onto a blank space to complete a sentence. This code works great, except it always resets the words. Is there a way to make it so it does not return to the beginning of the screen? I want to place words down and keep them there.

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      The easiest way to do this, in your case, is to create two objects; the word you need to drag, and then the area you're dropping the word into.
      When you drop the word onto the space, the word needs to be set so it hides itself when it's dropped, and the space, when dropped onto, checks to see what's been dropped on it, and then displays what that is.

  • @dan.a.delion
    @dan.a.delion ปีที่แล้ว +1

    hello, it`s me again, im binge watching all of your videos to make a good novel for jam)
    1) i have a question - i literally copipasted code for draganddrop, made my bg and pngs for my "circles squares" and so on, but i can`t proceed with novel after it`s one drag - was dropped in one of the circles, they don`t leave screen and just hang there for the rest of game. is there some sort of "clear screen and return to game" command?
    2) also somehow my drags don`t drop majestically in my "left circle" and "right circle", as yours, they just hang there and I am not sure if I missed something, what corresponds to this action in code?
    basically, what i want, is to have the ability to go through a pack of notebooks and sort them into two categories, find one special - and proceed to talk with other characters, proceed to play
    right now I have icons, bg for it, and the code is like yours *as it seems* but i feel like i am missing something and i don`t know where to look cause of nonexistent basic knowledge of coding and poor knowledge of coding English, so I am sorry if my questions seem stupid to u, i am SURE they are!!

    • @vimi
      @vimi  ปีที่แล้ว +1

      1) You can use "call" instead of "show" for your screen - I used the show screen so I could show the dialogue afterwords!
      2) In the if/else statements after the screen, I have a bunch of code that sets x and y coordinates for a new circle or triangle, based on what's dropped in where - otherwise, as long as draggable overlaps a droppable, even by a pixel, it counts that!

    • @dan.a.delion
      @dan.a.delion ปีที่แล้ว

      @@vimi oh, thank you very much for replying!!! i will try everything, thank you again so so mucn!!

  • @amethyst_moon12
    @amethyst_moon12 3 หลายเดือนก่อน +1

    I'm a bit late, and I'm not sure I you'll see this, but I'm having a lot of trouble. I'm basically trying to create something similar to the Caesar being stabbed thing you showed. I made a draggable and a droppable but nothing happens when the draggable is dropped onto the droppable. I've tried various solutions and even tried to use the "dropped" function but couldn't figure it out due to several different errors. Basically, after dragging the draggable to the droppable, I want to hide the screen and jump to a different part of the script. Do you know how I would go about doing that?

    • @vimi
      @vimi  3 หลายเดือนก่อน

      I'd just take the code I included in the description, and work from there.

    • @amethyst_moon12
      @amethyst_moon12 3 หลายเดือนก่อน +1

      @@vimi I tried that and couldn’t figure it out. But it’s fine! I was able to come up with another way to do it with some more research. Thank you!

  • @notanymoregames
    @notanymoregames 5 หลายเดือนก่อน +1

    Hey I know this is a bit old now. But I’m trying to delay the return in my drag and drop. I want it to do a few things first like snap to position, play a sound, then return True after a second or so the close the screen and continue with the script. Any idea how to do this?

    • @vimi
      @vimi  5 หลายเดือนก่อน +1

      Yeah; in my example script there, once the image snapped into the right spot, I removed the drag'n'drop screen, and replicated the placement of all of the elements on a separate screen.
      You'd want to do that, and then use regular ATL language to play the sound and do all the feedback and everything.

  • @durianjaykin3576
    @durianjaykin3576 2 ปีที่แล้ว +1

    how would one remove a dragged item once it dropped on a droppable? For example in the video, if a circle is dropped in a circle droppable, what is the best way to remove it?

    • @vimi
      @vimi  2 ปีที่แล้ว

      There's a few ways to do it, but off the top of my head, set a callback to "Hide" when an object is dropped is probably the easiest!

  • @jessicaherrera7900
    @jessicaherrera7900 2 ปีที่แล้ว +1

    Have you ever used Visual Novel Maker? Where would you put this type of code in the game? Thanks for the tutorials!

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      I haven't used Visual Novel Maker, but I imagine you can't use this code in there - different engines need different code 🤷‍♂

    • @jessicaherrera7900
      @jessicaherrera7900 2 ปีที่แล้ว

      @@vimi It says it uses JavaScript and coffeeScript. I just don't know where to add it. :)

    • @vimi
      @vimi  2 ปีที่แล้ว +2

      @@jessicaherrera7900 This code isn't even in Python - this is code for Ren'py specifically. If you want Javascript drag and drop code, try this:
      www.javascripttutorial.net/web-apis/javascript-drag-and-drop/

  • @diegou3261
    @diegou3261 ปีที่แล้ว

    Hello, I don't know much English, I have a doubt.... How can I do that when I use the drag and drop and grab the object and drop it anywhere, this same object not having reached its target, returns to its original position? thanks in advance, very good content!

  • @DrToxicology
    @DrToxicology 2 ปีที่แล้ว +1

    Would this work for a crafting system? My game is going to have that and I’m unsure if this would work for it

    • @vimi
      @vimi  2 ปีที่แล้ว +1

      It would work as a tactile element for a crafting system, but the actual inventory and crafting systems are going to be a bit more complicated!

  • @cipherz
    @cipherz ปีที่แล้ว

    How do you make the item dragable and clickable? Ive been trying to figure it out for a while

  • @Milkipaws
    @Milkipaws 11 หลายเดือนก่อน

    Also when you rop them in the right place how to change the scene back to normal

    • @vimi
      @vimi  11 หลายเดือนก่อน

      There's a few different ways - easiest is to just call the screen, and when the input is made, call the screen again. That resets everything back to the way it was originally.

  • @awakened4811
    @awakened4811 2 ปีที่แล้ว

    I have a question I can't seem to get answered anywhere else;
    I can't seem to combine this method with the cooking timer.
    When dragging/moving the draggable items, it doesn't show the fluid motion as I'm moving/dragging it; it "teleports" around.
    Removing the timer screen solves it, and I get fluid motion when dragging something, but adding the timer back just causes the draggable to "teleport" again.
    Is there any way to get a draggable item (as shown in your circle/square/triangle example), along with a timer so that the player has to match the shapes as fast as possible within the time limit?

    • @vimi
      @vimi  2 ปีที่แล้ว

      It sounds like your game is getting resource heavy somehow???
      You can try removing the bar function and seeing if the timer functionality is specifically what's causing that issue, and if it is, maybe increasing the units of time from a hundredth of a second to a tenth or a whole second would be the best bet (and then replace the bar functionality with an animated image)?
      If you get it to work, let me know what fixed it!

  • @truffeltroll6668
    @truffeltroll6668 ปีที่แล้ว +1

    Hey, how do i add a sound to a dragable object?

    • @vimi
      @vimi  ปีที่แล้ว

      You'd have to create a defined event, and activate it using any of the callbacks like activated, dragging, dragged, dropped, or clicked.
      These example events from the ren'py documentation are basically the sort you'd want:
      www.renpy.org/doc/html/character_callbacks.html#example

    • @truffeltroll6668
      @truffeltroll6668 ปีที่แล้ว

      @@vimi thanks!!
      Do you think hover could work as well?

  • @LumiLumi-j4s
    @LumiLumi-j4s ปีที่แล้ว

    Does someone know where I can find a tutorial for a drag and drop sorting minigame?

  • @goopuman
    @goopuman ปีที่แล้ว

    Okay so I feel like I'm missing something: What chunk of code actually serves as the trigger to make the game DO something when the draggable is dropped in the droppable?

    • @vimi
      @vimi  ปีที่แล้ว +1

      At 3:22, that's the custom definition that stores the drag/drop items names, and exits the user out of the screen if the user drags an item to a droppable.

    • @goopuman
      @goopuman ปีที่แล้ว

      @@vimi thanks for the reply! That helps, but is there any chance you happen to have a video up already that would describe what exactly those lines of code are communicating with? Like I understand that that code chunk will do what you laid out in the video. But if I wanted to modify it to just link to another screen or something, or jump to a particular label, or even use it on the start menu to start the game up initially, I don't really understand the code laid out here, well enough to modify it to my purposes. If you have another video that maybe delves more into that topic or if you know of one, would you mind pointing me in its direction?

    • @goopuman
      @goopuman ปีที่แล้ว

      It's a great video, I just have a lot of difficulty understanding things unless I can see all the way down to the roots of it. Certain renpy functionality is really obvious as to how it communicates with Python. I'm having trouble with this one though, so a little bit of an x-ray as to what exactly it's doing, how we're communicating with the dropped dragged, alternate activated, etc. Etc functions would be really helpful. Maybe it's something I should just go to reddit for. And if so feel free to tell me! Thanks again for this video and all the time you put into this and taking the time to respond to me

    • @vimi
      @vimi  ปีที่แล้ว +1

      Broadly speaking, When an item is dragged, I call this custom definition, drag_placed (dragged drag_placed in the drag item).
      In the definition, the first two lines just return back to the drag screen without doing anything else, so as long as you are actively dragging an item, the definition is waiting for you to drop the drag item into a droppable item. If you do not drop it onto a droppable item, then the definition does not do anything.
      Once the drag item is dropped, it's storing two values: the first is the term "draggable", which is the name of the thing you are dragging (store.draggable = drags[0].drag_name).
      In the second line, you're storing the name of the item you dropped in "droppable" by seeing what the drag item was moved to (store.droppable = drop.drag_name).
      Then, it returns a value, True (return True).
      How I use this in practice, is that I CALL a screen with the drag group (drag_sample 2), so when one of the items is dragged to one of the droppable items, the called screen disappears, because the definition drag_placed is returning a value, but not before it stores the two variable names for me.
      Then, I use a little visual trickery to give the illusion of some permanence to the screen.
      Now with those variables, I show a new screen, drag_sample3, which just shows the droppable items in their same positions, but with the draggable items removed. Then, I have some if statements that display elements based on the two newly stored values: store.draggable and store.droppable. I set an x-position value based on if they picked the left or right circle (droppable), and then I see what object was dragged (draggable), and then I only display that one object along the y axis of the circles, and use the x position value to center it on the left or right circle.
      Then, I list out where the object is placed, by using our stored values to display their names - "The [draggable] was put in [droppable]".
      ESSENTIALLY, all you need to know is that if you call a drag screen, you can use this code to get the name of the thing that was dragged, and the thing that was dropped, and then you can do whatever you want with that information - move them to a different part of your game, alter a value, or even bring them back to the drag/drop screen to do it again.
      From there, you're limited by your imagination!

    • @goopuman
      @goopuman ปีที่แล้ว +1

      @@vimi okay that's really helpful, I'm gonna try and implement that to make sure I understand it. Thank you so much for providing such a thorough and patient answer, also. Love your videos, and have a great day!

  • @TheP1x3l
    @TheP1x3l 6 หลายเดือนก่อน

    My new drag performer name is Circle. 😂

  • @rannielespina844
    @rannielespina844 2 ปีที่แล้ว

    Does this work if you build it on android?

    • @vimi
      @vimi  2 ปีที่แล้ว

      I'm not at my home computer where I can test it, but I'm fairly certain you can

  • @crystalunit5926
    @crystalunit5926 5 หลายเดือนก่อน

    Day #1 of asking a tutorial on how to export a game from renpy

    • @vimi
      @vimi  5 หลายเดือนก่อน +1

      On your ren'py launcher, under the "Navigate Script" section, press the text that says "Build Distributions". It will bring you to a new page that lets you name the zip file it will build, as well as the name of the executable file inside. Press "Build", and it will upload a zip file to the folder where ren'py is located on your computer.
      If you want to build your game for android or iOS, there are separate sections with their own distribution items listed there.
      www.renpy.org/doc/html/quickstart.html#releasing-your-game

    • @crystalunit5926
      @crystalunit5926 5 หลายเดือนก่อน

      @@vimi Ended the streak as soon as you saw it but TSYM IVE BEEN WONDERING HOW TO EXPORT FOR SOMETIME THANKS!!

  • @tomoyaokazaki2138
    @tomoyaokazaki2138 2 หลายเดือนก่อน

    as of 2024, with Ren'Py 8.2, the if statement doesn't work because (for some reason), "draggable" and "droppable" are not defined. It's bizarre, it's like being forced to define the "play" code command.
    anyway, this is the code that's not working:
    if drag_placed.droppable == "Meteor Card":
    $ xpos_var = 150
    if draggable == "Fire":
    show Fire:
    xpos xpos_var ypos 460

    • @vimi
      @vimi  2 หลายเดือนก่อน

      Correct, "draggable" and "droppable" are not defined, because you have to define them yourself. That's what the code at the 3:18 is for.
      You don't always want to necessarily define the names; instead of the function "drag_placed", you can replace it with anything else that does the associated action. So instead of those if statements you have there, you could call an action that instead just does the position changes and image calls you need. Way more efficient.
      If you included the drag_placed code, and it's that text that isn't working, then replace the "drag_placed.droppable" with just "droppable".

  • @MxVerdaArt
    @MxVerdaArt 11 หลายเดือนก่อน +1

    I was thinking a dress-up game. Apparently people find them relaxing, so I thought I'd make one without the usual gender expectations.

    • @MxVerdaArt
      @MxVerdaArt 11 หลายเดือนก่อน +1

      OMG AND A CAT (or dog) PETTING MODE. Maybe lizards and fish too, if they like being pet? Idk, I'm solidly a cat person