Among Us drag and drop mechanic?

Hello everyone i was wondering how can i achieve the mechanic of connecting wires using just widgets?

Right now i got six widgets: 3 on the left side of the screen the others are on the right side. So i need to connect them using some cable, wire or something.

I know that there is a Drag and Drop operation, but it does not track the mouse while dragging.

(I need to implement the exact mechanic that is on Among Us wires task)

I know that there is a Drag and Drop
operation, but it does not track the
mouse while dragging.

Yes it does:

  • on Mouse Move gets you screen space position:

317515-screenshot-2020-10-06-195034.jpg

  • or override Event Dragged in the DragDragOP, same data:

317516-screenshot-2020-10-06-195008.jpg

Thanks for the response.

Unfortunately the On Mouse Move event just work on the widget itself, so it was not a solution in this scenario.

Event dragged on the other hand worked like a charm:

So i called a function inside my widget to draw a debug point:

So i know who widget is dragged and where is drop.

Now, i need to put a texture instead of the draw point maybe? a delete all the lines that are not correct?

Even though it’s rather basic, there are too many screenshots to drop here and it would take time to document it properly. But here’s the project that could be a primer for something like this:

Image from Gyazo

Feel free to take it apart, use as is or ask questions if things are unclear.

sus…

1 Like

OMG I really appreciate the help thank you so much!!!

Hey Everynone, thank you for the amazing feature. When I tried to import this into my own project, I got this issue:

343410-teams-mn3wuiz7fs.png

Do you know how I can resolve this?

Thanks in advance

Ensure the dispatcher has the correct inputs, compile. Right click this node and Refresh, compile.


If you copy / paste nodes, Dispatchers will go bonkers:

You may need to right click some pins and recombine / split them.

Thank you! What an amazingly quick response! That solved every issue regarding wPlug.
I also ran into an issue with importing wWireBoard, for some reason Event Graph and On Paint are going haywire, but the the On Drag Over function seems fine.

Do you know what the issue might be?

Thanks for all the assistance

importing

How are you doing it? Migrating? As in:

Copy / paste will not work (well) as you’ll be missing a lot of reference (red) and the actual objects (grey pins).

I’ll just confirm that migrating those assets…

…works pretty well. And the only thing that needs doing is creating the Wire Board widget:

And this very part can be copy / pasted.

Hey! Sorry for my late response. Initially I copy pasted the .uasset files.
Afterwards, I did it through the method you mentioned, but it resulted in the same kinds of issues as I mentioned above.

In the other comment you mentioned that the Wire Board widget needs to be recreated. Is this the wWireBoard widget? I’m not entirely sure where this set of 5 components need to be placed.

An example of an issue in the On Paint issue I am presented with are for example the Starter Plug, when I refresh the node with W Plug as the variable type, it cannot connect to the lower component. Also, a FindPlugOffset component can’t be created, to replace the ‘Find plug wire offset’ function:

Besides this, it also misses a lot of variables, even when I migrate it:

343446-ue4editor-pn3fgbu7rs.png

Am I doing something incorrect, given that your migration works properly?

Is this the wWireBoard widget? I’m not
entirely sure where this set of 5
components need to be placed.

Anywhere in the Content folder - there’s a step-by-step in the docs link. Not sure about the errors at this point. Consider migrating it. Fixing references manually may not even be possible, you simply do not have those objects. And you do not have the required functions…

This is not something you can copy / paste.


Or are you saying that you’re seeing the errors after migration?!

Or are you saying that you’re seeing the errors after migration?!

This is the result after migrating as stated in the documentation, I did not copy paste it.

After migrating it a couple of times, I migrated it into the content folder itself (instead of a child directory which I created for it), which seemed to resolve the issue.

Thank you for all the time you’ve put into assisting me with this.

Could you test it by migrating it to new clean project? I’ve done that below and it just worked.

What you’re you’re showing is not relay fixable. The stuff that’s needed simply is not there.

If you cannot migrate, you may need to recreate is one by one.

which seemed to resolve the issue.

Ah, cool! Thanks for the update.