How do I Switch pots in slots?

Not favoritedFavorited Favorited 0 favourites
  • 9 posts
From the Asset Store
Toggles Dials Switches and Alerts ! A foundational sound grouping of Analog type switches and Steampunk effects
  • Hello There!

    I'm totally new to the construct, and started with putting together small games. Now I have a small game idea, but I stuck in one step (for two weeks now, and can't find the solution here, on YT, or even in the manual). I'm slowly going mad about it, but it should have an easy solution (like one bad condition or event).

    So, I have pots 2 in this example, but it should work for more as well. They are in slots in the beginning. After that when I pick them by drag I would move them to another slot. If the targeted slot is empty then it should jump in there if it is overlaped. If the targeted slot contains a pot, that pot should jump to the place where I dragged the one that I'm moving. And here is the problem: I can't pick the pot that are already there. That must be some small switch or something that I miss. I made it many ways, but still doesn't work. (In this version it seems I f..ked up the action to bring back the pot to original position, if the pot not overlap any slots, because it jump back all the time to the original place where it was at the start. I'm crying. How do I do it?

  • for two weeks now

    You should've asked earlier! There are many ways to do this. Here is one of the easiest, without families or instance variables.

    dropbox.com/scl/fi/ab0ujefk2oqnuvh87tmnh/DragDrop_pots.c3p

  • Thank You Very Much! I tried to solve it with different variables (global/local), but don't know nothing about this hierarchy/child thing. My main aim is to understand how I can manage the things in construct. It seems a simple way, now I will study it and try to find out what is happening. :) THANK YOU REALLY!

  • Here I go again! Another weeks gone. The original posted solution was not that I was looking for, but it help s a lot to understand. I made my version as is, so I just hope that someone can take a look, and can help me why is that not working?

    Tasks: Pots get in slots. Done. When move a pot to an empty slot it take the position. Done. When move a pot to an empty space pot jump back to the original slot. Done. When pot moved to a reserved spot it should positioned to the new slot, and the old pot (what as in the target slot) should go to the moved pot original slot. NOT WORKING! I think the logic is ok, but there must be some small mistake, that stop it working. Please help!

    dropbox.com/scl/fi/m6xabw7i0msktdgacgrh7/PotSlot.c3p

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure what's going on in your project.

    Here is an updated version. It would be easier if you had a paid subscription and could use families.

    dropbox.com/scl/fi/ab0ujefk2oqnuvh87tmnh/DragDrop_pots.c3p

  • Thank You! I will check it out. (Not yet have a paid sc. but it seems I have to do it soon.)

    Thank You Again!

  • I checked it, and seems legit for me. Now I start to learn it and if I have any question, I will ask, if you don't mind. Thank You Again!

  • Dears!

    I made my version by the sample, but it seems I still f..k up something. Can anyone tell where do I go wrong?

    dropbox.com/scl/fi/klh35ft0si8173b2z9rwb/WordSlot.c3p

  • Seems got it. (The equitation was it.) Thank You!

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)