Why are Xor, Nor and Nand Logic Gates Not Working Properly

I am trying to make a laser that whenever it hits anything, except for other lasers, it gets destroyed.

This is what I have so far:

Everything works properly except the – Xor gate. The Xor gate acts like a normal Or gate.
I have used Nands and Nors instead but all the gates that can invert are broken.

Can some one please help me?

2 Likes

gates work if stuff happens at the same frame
flowlab displays a yellow ‘on’ output for a time long enough for a human to see it.
since you’re working with positions, it’s highly probable that you aren’t hitting all of them at the same frame.

2 Likes

What I would recommend is having other object collisions set to “in” on a switch, then have the collision with laser make the gate turn it off, and a NOR gate from the laser turn it on.

I tried it and the Nor gates are not inverting – and neither are the Xor gates. :cry:

2 Likes

Try refreshing often - I also have issues with gates, but as long as you’re not using an unusual browser and you’re refreshing, it should work. Could you take a screenshot of your code?

It worked, I refreshed my browser and the logic gates are no longer cursed!

Here is the code:

Screenshot 2023-02-17 5.35.23 PM

I used all the logic gates that can invert and they work!

Thanks Meburnings!

2 Likes

Excellent! I’m glad it’s working now. If you have any more questions, just let me know! If you marl my comment as solution, others will know that the question no longer needs help.