x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can i do a Sliding Puzzle?

Hi, i know how make a jigsaw but i need make a Sliding Puzzle on Blueprints, like this https://youtu.be/aXtbiiCTOK4

Product Version: UE 4.21
Tags:
more ▼

asked Apr 25 '19 at 11:21 PM in Using UE4

avatar image

Wolf_Designer
3 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Are you asking about how to make an entire game or...? There are a lot of elements that have gone into this. Perhaps you could break it up into more digestible pieces, especially if you're new to all this. Here's a start:

Dividing a single image into interactive actors, I made this on a whim so it's rather bare bones: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1411963-can-blueprints-be-used-to-chop-an-image-into-pieces?p=1412068#post1412068

Depending on how complex and scalable the end result needs to be, there would be more or less elements that need to go into this, for the maximum simplicity I'd try:

  • assign the pieces initial correct coordinates during the creation loop; so each piece knows that is has reached the correct spot once the puzzle is ready to be solved. The 2D macro will spit them out for you, just have the actors store them.

  • for movement, I'd probably just do a short line trace to see if there's empty space a piece can move to - so 4 traces North, South, East & West in a Break loop until an empty space is found (the whole thing can be calculated manually, of course, since you have the coords, but the traces will be easier to set up). For simplicity sake you can put a border around the pieces to skip checks around the edges and prevent pieces moving beyond them.

  • use Snap Vector to Grid to find a resting position (or calculate manually again - you know the board size, piece size and the gap between the 2) and a Timeline to move them; check here if the coords are matching - you will need to do it for all pieces

That should work. There will be some gotchyas here, surely.

more ▼

answered Apr 26 '19 at 06:59 AM

avatar image

Everynone
14.6k 76 25 61

avatar image Wolf_Designer Apr 27 '19 at 06:20 PM

I understood it very well, right now I will be testing it, YOU ARE THE BEST!!! I THANK YOU A LOT, and I'm sorry about my English.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question