Tuesday, May 19, 2009

Simplest possible automatic door

Spawn 2 flat, wide props side by side lengthwise.

Select one to be the base and one to be the actual door. On the base, spawn a Target Finder set to anything you like (for a door, the range is good at 50-200 for a person, and 200-500 for vehicles and contraptions). Spawn a constant value of Z (Z being the width you want the door to open). Make an Arithmetic chip - Multiply close by. Put a WireHydraulic between the gap between the door and base and put the controller by the Target Finder, Constant Value and Multiply Gate. Make sure the Fixed box is checked.

Now for the wiring:

-Wire the A of the Multiply gate to the Target Finder.
-Wire the B of the Multiply gate to the Constant Value.
-Wire the Length of the Hydraulics to the Multiply gate.

There you go, you're done: Unfreeze the DOOR, not the base, and walk up to it. It should open and close depending on your distance.