I’m a noob when it comes to I/O stuff, I’ve been trying to figure out how to make two lights alternate off each other but I’m not sure how to do it.
I’m making a map for Zombie Massacre and have a police car model that I want to give siren lights that are continuously alternating between red and blue. So I have two placeable lights, one of each color, and I tried adding a player volume with connections to each light that make it so when one toggles on, it turns off a second later and the other turns on, but this isn’t working…
Does anyone have a solution? I’m probably missing something very obvious. It’d be nice if I could set both to “Fast Pulse” and then offset one so they’re not pulsing at the same time.
All I can think of is using logic relays. When one activates, it turns one light on and turns the other off. When the other activates, it does the opposite.
I can hop into my condo and play around with condo io logic to see if this idea works
Set down two placeable lights. I named mine red_light and blue_light. Set their colors accordingly.
Set down two relay modules.
In the connections tab, set one relay module to “TurnOn” red_light and “TurnOff” blue_light. Set the other relay module to do the opposite, TurnOn blue_light and TurnOff red_light.
Set down a toggle module. In its connections tab, in the “On” section, tell your red relay to Fire. In the “Off” section, tell your blue relay to Fire.
Set down a timer module. Set its time to whatever you want - I used 0.2 seconds. Set “Looping” to “On”, and set it to start on spawn.
In the timer’s connections tab, in “OnTimerComplete”, add a connection to your toggle module and set it to “Toggle”. Then, on the Properties tab, click “Start Timer”.
The lights should alternate between on and off.
What’s happening here:
The Timer Module is toggling the Toggle Module every 0.2 seconds.
The Toggle Module is activating either the red module or the blue module, depending on if its toggle state is switching to On or Off.
The red module turns on the red light and turns off the blue light.
The blue module turns on the blue light and turns off the red light.
If you only want to use one placeable light, you can replace turning on and off the lights with using SetColor on one light.