How to make a series of 3 timed switches (same timer), once all activated X happens if not Y happens

I am trying to make a puzzle based game, one of these puzzles involves a variable number of switches that have to be overlapped to activate. Once one is activated all must be activated within the allotted time or every switch reverts back to off. Once complete a door opens or whatever.

How on gods green earth should I go about doing this? I have been using a parent/child relationship for most of my content and have begun doing the same for these switches but I haven’t had any success getting them to work together collectively.

Here is what I have so far on the parent blueprint. The child (that is the blueprint actually in the map) sets the amount of switches to complete on begin play and that is all so far.

I just realised that my timer by tick is a bad idea as the first switch will finish that delay then turn off regardless of the counter number. The issue is though that the switches are not talking to each other.

Any thoughts? How would you implement this? Any better solutions? (I don’t want to use a level blueprint unless I have to, is there something higher than level blueprint that will persist through levels and can be cast to easily from within an actor blueprint?)

I tried to google but it just comes up with Nintendo Switch news (thanks 4.15… :smiley: )

Well there are many ways you can do this.
I would try it like this:

Use another actor as “puzzle master”. It will store status and reference of every switch.
In your switch:

  • when activated by the player -> set bool activated to true -> delay node (how much time the player has) -> set bool back to false

Now you can check in your master bp :
if (switch1-> active and switch2-> active and switch2->active) -> Puzzle solved

Regards

Hello, I just made this for you and anyone else with a similar question. It is kind of long, but the last 15 minutes is me playing around and switching the blueprints up to function a slightly different way.

[video]https://youtu.be/xRJkH9kEAzQ[/video]

Hello, I just made this for you and anyone else with a similar question. It is kind of long, but the last 15 minutes is me playing around and switching the blueprints up to function a slightly different way.

[video]UE4: MultiSwitchDoor - YouTube
[/QUOTE]

I’m watching now, thank you so much James for putting this together. As a relatively new UE4’er with only a few months experience it is great to see how you assemble your blueprints. Very clean and it has helped me already to understand some nodes I haven’t properly looked into yet, not to mention solving this conundrum in a much more efficient way than I was heading down!

Couldn’t have asked for a better response, thanks man :slight_smile: