+ Reply to Thread
Results 1 to 6 of 6

Thread: Wire hydrolics expression needed.

  1. #1
    Wire Noob ZezXion's Avatar
    Join Date
    Dec 2008
    Posts
    3

    Question Wire hydrolics expression needed.

    I am trying to make a door with wire hydrolics. I need it to open with a smoother of 50. It needs a button for the outside and inside so two buttons. And the main part I can not figure out is making it automaticly Wire-Weld latch as soon as it is completly open or closed.

    So if someone could take the time to help me. Please I would be very happy.

    Now I know this is simple but for some reason I just can't figure it out so don't call me a noob at wire because im actually quite good at it.
    zєzאเ๏ภ

  2. #2
    Spucatum Tauri Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    6,010

    Default Re: Wire hydrolics expression needed.

    Not equal comparison gate (Feeling like doing it different) to the Buttons (toggled)
    Toggle (Edge-Triggered) Clk to the Not equal
    Toggle (Edge-Triggered) On/off value to a constant value with the min/max values.
    That to the smoother and the hydraulics, you figured out that part already.


    Now for the weld latch.
    2 equal comparisons between the output of the smoother and the constant value min/max values.

    Or (any) to those two comparisons

    Weld Latch to Or (any).

    That should do it.
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

    Quote Originally Posted by Anticept View Post
    By the way, Bull is in charge.

  3. #3
    Wire Noob Psycho0124's Avatar
    Join Date
    Jun 2008
    Posts
    13

    Default Re: Wire hydrolics expression needed.

    The only problem with comparing the hyd length to a value is the imperfect constraint system. Stuff sags even when welded sometimes.

    I've tried doors like this in the past and while they will indeed latch, as soon as someone manages to move the door even a little, the output length on the hyd changes and the weld disengages. The same applies for driving or flying contraptions. Constraints can sag when things are moved around and that sagging is shown in the hyd output length and will cause problems with latch-circuits.

    A more reliable way to do it is by time. Measure how long it takes for the door to come to a full close and have the latch engage from then on, regardless of the hydraulics output length.

    Here's the (very simple) expression I use for weld-latch doors. It has a built-in delay of one second:
    Code:
    N@DoorController
    I@A B C
    O@Hyd Lock Timer
    interval(1000)
    Hyd = ( A | B | C ? 120 : 2)
    Lock = ((Hyd <= 10) & (Timer >= 1) ? 1 : 0)
    Timer = ( A | B | C ? 0 : Timer += 1)
    A non-zero value wired to any of the inputs will set the hyd length to 120. When the inputs are all zero, the length will drop back to 1. These are "while" inputs for things like keypads which can output a 1 for the amount of time selected or target finders which will output a 1 while you're in range (color filter on the TF and color yourself so it doesn't activate for anyone else). You can modify the open and closed lengths there in the first line of code for use with all sorts of doors.

    If you like, I could probably make one that's a little more button-friendly. I.e. lets you push the button and the door remains open for a set time. Let me know if you want it!

  4. #4
    Spucatum Tauri Bull's Avatar
    Join Date
    Jun 2008
    Location
    Finland
    Posts
    6,010

    Default Re: Wire hydrolics expression needed.

    Quote Originally Posted by Psycho0124 View Post
    The only problem with comparing the hyd length to a value is the imperfect constraint system.
    Where did I compare the hydraulics to something?
    I compared the smoother to the constant values, I'm pretty sure a smoother doesn't sag.
    My signature has a point.
    Quote Originally Posted by Squeakyneb View Post
    when l3ulletje says do it, do it.
    That

    Quote Originally Posted by Anticept View Post
    By the way, Bull is in charge.

  5. #5
    Wire Noob Psycho0124's Avatar
    Join Date
    Jun 2008
    Posts
    13

    Default Re: Wire hydrolics expression needed.

    Quote Originally Posted by l3ulletje View Post
    Where did I compare the hydraulics to something?
    I compared the smoother to the constant values, I'm pretty sure a smoother doesn't sag.
    Hehehe.. Well to be honest, there was about an hour and a half between the time I hit reply and the time I posted that response (caught up with dinner). Was talking to the op and referring to the "HydOutput <= Constvalue" solution as the easiest but unfortunately least effective. That is a great solution you posted by the way. Time to go scrounge for a smooth() expression command.

  6. #6
    Wire Weeaboo Pyro-Fire's Avatar
    Join Date
    Aug 2007
    Location
    WA, Australia
    Posts
    1,804

    Default Re: Wire hydrolics expression needed.

    >>Moved to Help&Support



+ Reply to Thread

Similar Threads

  1. Wire needs to get optimized - Team needed
    By aVoN in forum Wiremod General Chat
    Replies: 9
    Last Post: 08-17-2007, 11:46 AM
  2. Hydrolics
    By teriaki in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 07-13-2007, 04:57 PM
  3. Follower Expression Help Needed
    By alan in forum Installation and Malfunctions Support
    Replies: 6
    Last Post: 07-01-2007, 10:45 PM
  4. Car Lights Expression Needed
    By Luke_M in forum Installation and Malfunctions Support
    Replies: 14
    Last Post: 06-13-2007, 12:43 AM
  5. Pod Turret Expression Help Needed
    By alan in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 06-07-2007, 06:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots