+ Reply to Thread
Results 1 to 5 of 5

Thread: Save is apparently breaking my circuit

  1. #1
    Wire Noob Belarr's Avatar
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2

    Default Save is apparently breaking my circuit

    I'm working on an elevator with a few differences from many I've seen:
    • Buttons inside elevator temporarily lock call buttons
    • Call buttons lock elevator buttons when used if not locked
    • Keypad on the inside gate of each floor that is timed
    • You have 15 seconds to enter the code before the buttons are released

    I had it working just like I wanted it earlier, but after I unhooked the testing pieces and moved it to it's proper place, saved, and then was forced to load it. Now it just refuses to auto open the gate when a call button calls it down to a floor unless I hit it twice.

    Each call button is on it's own circuit for a few reasons, but I'm also open to suggestions on how to condense parts.

    I am using two separate scripts to accomplish this (it doesn't look pretty, but it USED to work)

    Inputs:
    Btn = Button
    Kpd = Keypad
    Cls = Constant Chip Number for open gate state
    Dst = Constant Chip Number for closed gate state
    Flr = Constant Chip Number for floor height
    Tmr2 = Timer from Elevator circuit

    Outputs:
    Elv = 1,0 output
    Wld = Weld latch switch (not implemented)
    Timer (Not used)
    Enbl = 1,0 variable to distinguish differences in call or elevator button
    Dabl = 1,0 variable that is only on if timer is at current time and Enbl is on

    Code:
    N@Door Controller
    I@Btn Kpd Opn Cls Dst Flr Lock Tmr2
    O@Elv Hyd Wld Timer Enbl Dabl
    Btn==1 | Kpd==1 -> Enbl=1;
    Dabl = (Enbl==1 & Dst==Flr & Tmr2>=1 ? 1 : Enbl=0)
    Elv = (Btn == 1 & Lock == 0 ? 1 : 0)
    Wld = (Dabl == 1 & Tmr2 < 16 ? 1 : Enbl=0)
    Hyd = (Dabl == 1 & Tmr2 < 14 ? Opn : Cls)
    Inputs:
    A1 - H1 = Elevator Buttons
    A2 - H2 = Call Buttons
    EH = Get height value from smoother chip as it goes up

    Outputs:
    O = Floor height sent to smoother chip
    L = Variable sent to call circuit to lock it out and used to lock itself when call buttons are used
    Timer = Timer used on the gates and locking mechanism

    Code:
    N@Elevator
    I@A1 A2 B1 B2 C1 C2 D1 D2 E1 E2 F1 F2 G1 G2 H1 H2 EH
    O@O L Timer
    A1==1 & L==0 -> O=-148, Timer = 0;
    A2==1 & L==0 -> O=-148, Timer = 0;
    B1==1 & L==0 -> O=-47, Timer = 0;
    B2==1 & L==0 -> O=-47, Timer = 0;
    C1==1 & L==0 -> O=50, Timer = 0;
    C2==1 & L==0 -> O=50, Timer = 0;
    D1==1 & L==0 -> O=149, Timer = 0;
    D2==1 & L==0 -> O=149, Timer = 0;
    E1==1 & L==0 -> O=245, Timer = 0;
    E2==1 & L==0 -> O=245, Timer = 0;
    F1==1 & L==0 -> O=343, Timer = 0;
    F2==1 & L==0 -> O=343, Timer = 0;
    G1==1 & L==0 -> O=441, Timer = 0;
    G2==1 & L==0 -> O=441, Timer = 0;
    H1==1 & L==0 -> O=539, Timer = 0;
    H2==1 & L==0 -> O=539, Timer = 0;
    L = ((Timer > 15) ? 0 : 1)
    Timer = ((EH == O) ? Timer += 1 : 0)
    Here is how it looks in game:

  2. #2
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default Re: Save is apparently breaking my circuit

    Use adv duplicator to save your stuff
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  3. #3
    Wire Noob Belarr's Avatar
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2

    Default Re: Save is apparently breaking my circuit

    Quote Originally Posted by Black Phoenix View Post
    Use adv duplicator to save your stuff
    I would and do for the most part, but that way I construct aesthetic objects, it requires that I keep them in one spot until they're finished.
    "...and so by process of elimination, the only person left, and therefore the murderer was...THE CAKE!"

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

    Default Re: Save is apparently breaking my circuit

    Well, wire and save, doesn't mix well. There was a good reason for it, but that I have forgotten.

    In case you didn't knew, there is a checkbox in adv. dupe to paste on the original location, that should put everything back nicely.

    Little tips on expressions:
    I highly recommend switching to Expression2.

    and A==0 -> and A==1 -> can just be written as
    !A ->
    A ->
    (Unless you want to compare A with 1, but that isn't the case here.)
    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
    Official Bastard of Wire Jat Goodwin's Avatar
    Join Date
    Aug 2008
    Location
    Colorado Springs
    Posts
    2,771

    Default Re: Save is apparently breaking my circuit

    iirc, the source engine really doesnt care to much for this "lua" thing that has been forced upon it.
    What I do to save projects with the adv dupe is I freeze everything, rope everything, then adv dupe.

    When I spawn it again I use "Spawn Frozen" and "spawn in same location" or w/e. Things tend to not be so crazy.
    Ö͎̗̫̙̝̹͓̤̙́ͣͤ̈́̋̽̋͜f̺̦̠̻̜̼̮͓̖́̓̄̿̓̌̓̍̔f̵̳̻̜̹̤̱̊͒ͤ͌ ̅ͭͮ̾͟i̗͖̎͗̇ͯ̈̀̌̽c̯̮̉ͮ̾͟͡i̵̺̻̠̘̤̫͕ͯͭ̅͊ͤͦͧa̷͇̖̲ͥ͗ͪ̎ͤ ̽̾ͫl̶̈́̉̉͂̿̎ͯͥ̐҉̗͙̦̻̪ ̪̻͕̗̝͈̘͓ͬ̋̕͟B͚̲̍͢ā̸̪͔͖̟ͫͨ͜͝s͈͔͔͖͇͍̗͛ͯ̑̂͟t̮̤̬̩̅ͧ̎͑͗ ̃̕͟a̸̧̻̖̘̞̪̲͈͕̲͊ͭͪ͆̉r̯̩̮̬̥̤̗̙̃͌̑͊͢͞ď̠̦̲̥͢͡ ̵̶̢̱̲̺͈̘̳͕ͤͅo̯̞̙̦͖̪̽ͩ͊ͅf̵̦͈̣͙̰̎͋̿́ͅ ̛͕̹̫̰̱̾̓ͪ̌̽̊͘͡W̨̬̲̤̖̽̿͛ͨ͛̃̎͐̏i̛̼̳̝̺̝̭͙͋̑͑ͬ͠ṙ̼͔̪ͯͨͭ ̕e̸̗͕̰̒̃ͩͬ̾͆́ͅͅ

    I Require More Minions! Join us on the IRC !
    List of Reasons to idle on the IRC: Wire QDB

+ Reply to Thread

Similar Threads

  1. What's wrong with this circuit?
    By Aero in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 08-17-2007, 05:34 PM
  2. Timed Countdown Detonator (Circuit Diagram)
    By evileliminator in forum Gate Nostalgia (Old School Wiring) Discussion & Help
    Replies: 9
    Last Post: 07-12-2007, 03:27 AM
  3. Breaking my Hoverballs?
    By kalleguld in forum Bug Reports Archive
    Replies: 3
    Last Post: 06-02-2007, 01:43 AM
  4. Self is apparently nil.
    By Treelor in forum Installation and Malfunctions Support
    Replies: 8
    Last Post: 06-01-2007, 10:05 AM
  5. Circuit Board Macro
    By Qjet in forum Ideas & Suggestions
    Replies: 3
    Last Post: 03-27-2007, 09:09 PM

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