How do I use code to make an object collidable or uncollidable?

I have a door that moves very high in to the sky when the global variable is set to one, but when set to zero it moves into its default position.

But then I decided that I wanted the player to go through the door when global variable is set to one, and be blocked when it is set to zero. Instead of the door moving up and down.

This is what I have for the door:
Screenshot 2023-02-27 9.12.39 AM

How do I make an object collidable or uncollidable using code?

Can someone please help me?

use the Enabled block. you can disable and enable collisions with it

1 Like

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOh, I always igored that block and thought it was useless.

Thanks!

3 Likes

every block in flowlab has a purpose, you can read the behavior handbook to see what every behavior does :+1:

2 Likes