How do you delay castings from an array to another blueprint?

Using delays inside a for-loop is probably going to give unexpected results, as in your case.

A cleaner solution would be to make the TurnOn event in your HallLight blueprint take an additional input argument (say, a float named “wait”), and the implementation applies the delay itself before flipping the light state. Your for-loop then would simply pass the appropriate value for wait when calling TurnOn for each actor.

I am attempting to cast to an event in another blueprint, of which there several referenced in an array. I want pairs of individual instances indexed in the array to activate slightly after one another. Logically, I think this should work, but what’s happening is they all activate at the same time, deactivate a second after and come back on again a second after that. Does anybody know what I’m doing wrong? Or should I be getting the results I’m expecting?

I tried what you suggested, but even after a couple of days I still can’t get things to work properly. Obviously I am doing something wrong, but I don’t know what it could be. Here are some screen grabs of my blueprints and what happens in them when I play.

Notice the the first time I run a test, execution stops at the Cast To node and the lights don’t come on. The second time, I connect the Cast Failed pin to the delay and it works, only the delays aren’t applied and there seems to be a break in the execution where the signal stops at the Cast To node and continues after the Delay node.
I’m not sure where I’m going wrong, but some behavior I thought was interesting was that signals pass through all the delays simultaneously, even though they each have different times.

Been working on it some more and I still get the same results. The issue seems to be with the instances themselves not firing individually, but as a group. The screen grabs show you the changes I have made to the blueprints. The only other thing I can think of is creating separate blueprints for each pair of lights and have one set cast to the next one. It seems a little redundant to make several blueprints of exactly the same thing. I’m sure there is a much more efficient and elegant way to go about this.

Solved! I decided to remove all of the script in the HallLight blueprint, its only purpose is to enable the switch to have something to cast to and to render it invisible at play time. The change to the script in the HallLightSwitch blueprint you can see below.

Essentially what I did was create 3 arrays instead of one for each set of lights and added the appropriate lights to the appropriate arrays. Using a sequence I was able to put the arrays onto different paths and apply separate delays to each of them. I’ll probably do a video explaining how to do the whole thing from scratch, but hopefully to above pic will helpful to anyone with similar issues in the mean time.