+ Reply to Thread
Results 1 to 3 of 3

Thread: [Help] E2 two button door

  1. #1
    Wire Noob anthonywolfe's Avatar
    Join Date
    Aug 2009
    Posts
    8

    Default [Help] E2 two button door

    Well for awhile I have been trying to create a two button door. You know so you won't get locked out of your fort. :P

    But I kinda hit a dead end. I came up with a basic really basic expression but it kinda fails if you go out the door go back inside without using the button. (Dieing and respawning using a mobile spawnpoint) when you try to open the door nothing happens.

    Here is my code.

    Code:
    @name Door
    @inputs On On2 #Button1, Button2
    @outputs Value
    @persist 
    @trigger 
    
    if (On|On2==1){
        Value=797
    }
    
    if (On|On2==0){
        Value=697
    }
    Is interval(int) anything like the C# Thread.Sleep(50000); //5 seconds
    so after say 5 seconds the door shuts.

    Now if I missed any tutorials I am sorry but I did try to find one before posting.

  2. #2
    Wirererer Josef's Avatar
    Join Date
    Dec 2007
    Posts
    159

    Default Re: [Help] E2 two button door

    Try this:
    Code:
    @name Door
    @inputs On On2 #Button1, Button2
    @outputs Value
    @persist 
    @trigger 
    
    if (~On|~On2){
        Value=797
        timer("Close",5000)
    }
    
    if (clk("Close")){
        Value=697
    }

  3. #3
    Wire Noob anthonywolfe's Avatar
    Join Date
    Aug 2009
    Posts
    8

    Default Re: [Help] E2 two button door

    Thanks it works flawlessly.^_^

+ Reply to 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