How would I make two different lights have different delays on a single tick event?

Hi!

Sorry, I’m kinda new to this but, I thought I’d give these forums a shot since they seem to help a lot with other issues I come across.

I am basically trying to make it look like there are police lights around the corner of a building by having a red and blue light flashing… However, It seems that I can only run the code off of one even tick (for the blue light) rather than having two ticks run alongside each other, how do I go about joining these up to work with two different delay timers?

I will insert an image of how the code looks below:

This is the effect I’m trying to get but, with both lights flashing opposed to just the blue one:

234313-police-lights-around-the-corner.png

I will like to make it clear that coding is not my forte as well as forums, so please do keep it simple as possible if possible, Thanks! :slight_smile:

There’s many ways I think you can do this but I’ve not got Unreal to test just yet, you could use a for loop, then set blue light visibility to off, red to on, delay, blue light on, red on and that should loop eternally flicking them on and off one after the other for the duration of the delay.

you could accomplish what your looking to do with a sequence node. the sequence node has multiple output exe pins and fires them one after another. in this situation however i would advise using timers. timers can be set to loop and will fire events at a regular interval. also using a flipflop would be a pretty convenient way to accomplish the task. each time a flipflop is activated it runs a different output pin, so the first time it would run pin A then the next time it would run pin B then back to pin A, on and on as many times as it was activated.

I’ve taken what you’ve said and given it a go… I can’t seem to get to work with a for loop (mostly because of my lack of understanding level blueprints), I don’t suppose that whenever you can, you would be able to upload an image of what you mean for the example you’ve given? :slight_smile:

At first, I didn’t quite understand how that would work for what I was trying to do. However, I noticed what you did and it works like a charm, Thank you very much!

Yeah this is a much better way to do it. I forgot all about flip flop.

Thank you both anyway, it’s always good to have a grasp on different ways to go about doing things :slight_smile: