Dispatcher Event only fires once?

I posted this on the answer hub as well but figured I might get a response faster here. I have a rather interesting dilemma. I created a blueprint for a switch on a wall. When the player approaches it, it enables input and allows them to press “E” to activate it. It activates fine. My problem is, I have an event dispatcher which fires an event to the level blueprint because I have a puzzle in which the player must hit 3 different switches in a specific order. All 3 switches are using the same blueprint. The first switch I activate fires fine and the event is called in the level blueprint to do the appropriate things. When I get to the second switch. The event doesn’t fire.

As I said, the first switch that gets activated fires fine (I’ve placed breakpoints both in this sequence and in the event in the level blueprint). After leaving the breakpoint on the call event here, the second switch I hit, completely skips over the event call even though it has a breakpoint on it and turns the light on. The sequence completely ignores the event call even with a breakpoint on it.

Does anyone know why this is? If so, how do I fix it? Please don’t tell me I’m going to have to use 3 different blueprints to get this to work correctly. That seems rather… inefficient.

Thanks a bunch!

can you also show how you setup the dispatcher event?
this is just the calling part, and setup part is quite important to understand the problem.

I’m not sure what you mean by the “setup part”. All I did was create an event dispatcher in the switch blueprint:

Set up the call as shown above, then place the actual event in the level blueprint:

As I mentioned, all 3 switches are using the same blueprint. The event activates in the level blueprint just fine the first time, but not at all for the other two when I activate them. I placed a breakpoint on the call in the image on my OP. When I activate the first one, the breakpoint stops the execution on the call. When I activate the 2nd and 3rd switches, the breakpoint doesn’t stop execution on the call at all, but the “Set Visibility” node fires all 3 times. It seems to be completely skipping the execution of the call on the 2nd and 3rd switches and continuing through the sequence. I will say though that the event does only fire on the one I placed into the level from the content browser. The other two switches I alt-dragged out from the first. Does that matter?

EDIT: Upon testing, it seems to only fire the event on the FIRST one I place into the level. Any others I place into the level does not activate the event. So basically I’m going to have to use 3 separate lever blueprints and events to get this to work? That seems kind of stupid.

did you see the name behind LeverActivated node? inside (), that’s the level object that could issue the event.
I wouldn’t usually call a way to make game logics wrong, but this is kinda falling into the category of it.
It kinda not used as designed, custom events would suit your need if you want to do it in a level blueprint(through game mode).

There are many ways to do it the way you want:
Goal: do switchess in order to unlock door, light don’t turn on if switched early, reset switch if order is wrong.
Analysis:
1.switch and light should be able to place anywhere on a level even separately, light should be able to switch out to different asset(even no light assets) if required.
switch should have it’s own trigger volume that dictates conditions on how it could be switched or not(ie player close to it, like in Epic light switch tutorial )
2.switch and lights should connect to something that handles order of turning on and reset, upon success issue a event to do something else(door, kill boss, etc)
3.level blueprint should be limited so the same setup can be portable across level, or at least limit setup time.
4.maybe spice things up to give more variety, ie. switch order based on light color, reset randomize light color location, only 2 of 3 should be switched, etc.

Requirement:

  1. a blueprint interface to handle events such as, turn on/off, change color, and check dependency, accept manager reference.
  2. a switch that implements 1. and has it’s own trigger volume to enable/disable input. To use both interface message and input events to switch on/off, play animation, switch material color, etc.
  3. a light that implements 1. and use interface messages to change color, or turn intensity of light to a specific amount.
  4. a manager blueprint that implement check dependency part of 1. and are able to ie, reset all switches, change light colors by using interface messages.
    this manager blueprint must have arrays for input(switchs), and output( lights and doors). while it’s logic checks for conditions.
    if dependency is required, you need to have a array to save order of that dependency.
    Ie. a struct array that contains following things, inputObjRef(Actor), outputObjRef(Actor), order(int), outputColor(color) for switches and lights.
    And a special doorObjRef for eventually open the door(or whatever things you want to achieve.)

Implementation:
after all requirements are done, you can drag switches and light pairs on to scene, add element to your struct array, and add door to your manager.
then test if your logic and order are properly checked with manager blueprint.