Noob question for Logic Gates

Hi, I want to launch a cast if two events are launched at same time, I’m trying to do like a AND logic gate, but I don’t find nothing about that in BP, checking I’ve suppoused than **Gate **was my solution but doesn’t works.
5a74b1944b62bb99cd0ec3fad78470dea120e8ba.jpeg

You mean the AND node?

Yes, like AND node but ready for events/flow charts, I found AND nodes but for variable types (string, float …)

Equal? If 2 strings, ints, floats, etc are the same then it sets a bool to true.

In the original blueprint you posted, don’t you also need to wire left mouse button released to close the gate?
Also, if the “send item” happens before the “left mouse button” then the gate will not be open in time.
I think if you could describe exactly what behavior you want in game/UI terms, it would be easier to figure out what particular implementation you want.
Specifically, a real logic “AND” between events doesn’t make much sense, because there is only one event happening at a time.

Probably there a way to convert them, I don’t know, buy direct is not possible to link a “Exec” from the event for example to incoming port like string, int, float …

That sounds with sense (in time). I’m casting a ray from the camera, I want to gather a object (LMB) if there is a current target (raycast get it by the Event).
Probably is better idea to save in a variable the current target and then check it after press the LMB. If you have a better idea post it please, gonna be very appreciated.

Saving the current target of a raycast in a variable, and then checking that the variable is what you want (say, using Cast As and look at validity) in the LMB down handler seems like a reasonable way to do it. At the cost of running one raycast per tick. You could also do the Line Trace only when the left mouse button is pressed, if you don’t need the object for something else (like drawing highlights when hovering or whatever.)

gateexample.png

Here’s a basic example usage of a gate that I made.
There’s a trigger volume placed in the world that turns on a light. You can touch it all you want, but unless you do the conditions to open the gate, then the trigger volume will not turn on the light.

Gates are best used when you are repeatedly doing an action that normally would activate something often(like the player character touching a trigger located next to the player start) but you don’t want them to actually do something until specific conditions are met.

I am not sure what you want to do but I hope this helps you understand what Gates are good for.

My take