Profile image

Help with some lights

6,831 Skykid028  2 months ago

Hello, I would like some help with a code for making lights blink back and forth like this

I tried the 0,0.5,0.5,0 format and overtime they overlap, help would be highly appreciated and I'll be sure to give credit whenever I use it. Thank you in advance.

  • Log in to leave a comment
  • Profile image
    12.5k overlord5453

    @Skykid028 okay. Just a minute.

    2 months ago
  • Profile image
    6,831 Skykid028

    @overlord5453 I am so sorry but the lights still remain off. Do you think you can make a quick build with the two lights with the codes inputted in them

    2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 this will work
    Activate1? round(sin(sum(360 * 1)) = 1 : 0
    Activate1? round(sin(sum(360 * 1)) = -1 : 0
    No overlapping, no turning off. Beacons are set to steady. You can also use
    Activate1 & round(sin(sum(360 *1)) = 1
    Activate1 & round(sin(sum(360 *1)) = -1
    Does the same thing as before.
    Turns out, the previous code didn't output 1 or -1 but something like 0 to 0.998626 and 0 to -0.9737377. But this time the output is rounded and is 0 to 1 and 0 to -1.

    2 months ago
  • Profile image
    6,831 Skykid028

    @overlord5453 so I tried your new code and nothing unfortunately, they both just stayed off

    2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 you only have to do it once. Turn on, turn off then on again and it will be the way you want it to be. Atleast as far as I tested and i don't really know why this occurs. If you didn't like it try this, first set beacons to steady then
    Activate1 ? (sin(sum(360 * 1)) = 1) : 0 in one of the beacons and Activate1 ? (sin(sum(360 * 1)) = -1) : 0 in the other.*1 controls speed. Change it your liking.

    2 months ago
  • Profile image
    6,831 Skykid028

    @overlord5453 I'm not really a fan of having to play The guessing game when you turn them off and turn them back on for a second time but after a while you get the right blink pattern you're looking for so yeah thank you 🙂

    2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 glad I could help.

    2 months ago
  • Profile image
    6,831 Skykid028

    @overlord5453 awesome thank you, that's exactly what I was looking for

    +1 2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 activate and deactivate them then activate again, it will work. I should have brought that up earlier.

    2 months ago
  • Profile image
    6,831 Skykid028

    @overlord5453 I don't mean to play 100 questions but when I put this in the input on one they both blink at the same time. I'm guessing that's not where it goes?

    2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 exactly....... Wait no
    Like this
    smooth(clamp01(Activate1),1/0.5). 0.5 is the delay in seconds.

    2 months ago
  • Profile image
    6,831 Skykid028

    @overlord5453 so like this
    (smooth(clamp01(Activate1)))

    2 months ago
  • Profile image
    12.5k overlord5453

    By the way, it's the code for landing gear I copied from an in game plane. I have repurposed it for this and some other things where I needed a delayed input.

    2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 okay, try this
    Put 0.5, 0.5 on both. But this time give each of them input. whatever input you want on the first beacon and (smooth(clamp01(the input used in the first beacon),1/0.5) on the second beacon. The result will be the beacons blinking one after the other at 0.5sec Itervel. Because what you are trying to achieve here is something simple, it's best to use this instead of messing with the blink program.

    2 months ago
  • Profile image
    12.5k overlord5453

    @Skykid028 hmm. I will get back to you after some testing.

    2 months ago
  • Profile image
    6,831 Skykid028

    @WisconsinStatePolice and @overlord5453 think both of y'all but they bounce all over the place

    2 months ago
  • Profile image
    12.5k overlord5453

    Try 0.5,1,0.5,1 on one side and 0,0,0.5,1 on the other. Haven't tested this myself but give it a try. Just came up with it so no guarantee.

    2 months ago
  • Profile image

    0,0.5,0.5
    and
    0.5,0,0.5
    might work. I haven’t tried it in a while. Tell me if it doesn’t work and I’ll pull the code for you.

    2 months ago