Forum rules - please read before posting.

(Question)Puzzle template: Item arranging

Hi, I'm new to this asset but it really is a lifesaver, love it. And this forum is a nice place as well.

(Apologize ahead if this is a stupid question, I don't quite have knowledge of coding & my first language isn't English.)


I'm using the Item Arranging template to achieve my drag & drop mini game in my project. It worked really nice.

But the small problem is: I have 3 items and 3 slots. And I only want the item to be placed into the slot, I don't want items to be swapped with each other.(I'm making a horror game where you need to dissect bodys so...Organs shifting places looks a bit weird.) And I have no idea how to script it...

Also, when I'm searching around in forum, I saw a October 2020 post that said "Lock When Correct" option was added to the piece component. But I couldn't find it anywhere, was it deleted or it's just I missed it?


If anyone can help/guide me with this, I really appreaciate it<3.

Comments

  • Welcome to the community, @GOA_lien.

    The "Lock When Correct" dropdown field is a global setting - it should be on the Arranging Puzzle Manager component, rather than individual pieces.

    Setting this to "After Each Correct Placement" will prevent a piece from being able to move once placed in the correct slot.

    Though, it's still possible to move/swap pieces if they get placed in the wrong slot. Are you looking to prevent this, so that each piece can only be placed in their correct slot?

  • Thanks for reply!

    I checked all around yesterday and didn't found the manager, but I found it now after your guide——didn't realize that value is on the Collection component of items. Sorry for missing out.

    I set the "lock when correct" and "only correct accepted", it worked perfectly now :) Thank you again for your patience.

  • I'm having an issue with this script that Id appreciate help with. My pieces have the Remember Arranging Piece component attached, but it doesn't seem to be working.

    If I leave then return to the scene the pieces aren't in the place they were released, nor do they snap or trigger the Win action list anymore. Putting a movable and remember movable component will remember the position. But I still have the issue with it not triggering the Win actionlist nor snapping the pieces into the slot.

  • edited January 14

    Don't attach any further components to the pieces - Remember Arranging Piece ought to save both their position, and slot. The slots, however, will need to have Constant ID components attached.

    Is the Console reporting any relevant info?

  • Hey Chris, I did as you said but it's still not remembering. Then I copied the sample puzzle into my scene, made sure the slots have Constant IDs but it didn't save the positions on the sample scene pieces either. This happens when the player exits the scene then returns.

  • I can't reproduce such behaviour with the example scene.

    Does this also occur when you save/load the game after making changes, rather than exiting the scene, and when did you last download the package? Though it wasn't updated too recently, if you've had it a while it may have been changed since.

  • I can confirm that I have the most recent version in my project. When the puzzle is unsolved, when leaving the example scene and then running a Scene:Switch action list to return to the example scene, it doesn't seem to be remembering the position or the ability to snap. Perhaps I forgot to mention earlier that the puzzle was unsolved. I haven't tried the save/load suggestion yet.

  • Save/load ought to rely on the same system. What's your AC version, what platform are you working on, and are you overriding the default save format/handling via custom script?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.