How do gates actually work?

I’m having a issue with my camera resetting part of BP. I want camera to reset when middle mouse button is pressed and released without moving mouse itself and I’ve mostly accomplished that already.

My problem is that it actually resets camera when MMB is pressed instead of released.
eeab9dea01a5979423790a8d6271204e36351dd4.jpeg
I’m having a hard time figuring out how to set that second gate up so it would work like intended. Or maybe is there much better solution?
I have absolutely no programming background so I may be ignoring something oblivious.

You can double click on them to see how they work in the inside ( just like you are making your own custom macro node ).

The basic way they work: “Enter” This is when you’d walk to the front door / Gate.

Open = “The gate should be open when you walk to it” - Closed = “The gate should be closed”.

Exit = What’s behind the gate.

Say you were a Pizza delivery man, and they asked you to come in the house (While they are out) and put the pizza on the table. You “Enter” (Walk up to) the front door /the gate and “If they left the key on the porch” the door would be open, otherwise the door would be closed.

Documentation for reference: Flow Control | Unreal Engine Documentation

What I would do is put a “Sequence” on “Right mouse button”. The first thing it does is close the first game, Then put the code that’s attached to the second gate to the “Then 1” of the sequence :>

Also, Welcome to the forums! :>

1 Like

If I do that it resets the camera as soon as I let the button go which is not what I want it to do.

Haha, thanks! I’ve been lurking here since the beginning though. :slight_smile:

I added some comments to make it more clear what I want to do and with what information.

Very oblivious fake edit: I actually managed to figure out a solution that meets all criteria while I was making this post :smiley:

Thanks for help though!

I have never really programmed or scripted before and I started with Blueprints only few days ago so every success no matter how small is very exciting!

You want to know how Gates work? Just ask Bill. :rolleyes:

Sorry. :o