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 }
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.
Is interval(int) anything like the C# Thread.Sleep(50000); //5 secondsCode:@name Door @inputs On On2 #Button1, Button2 @outputs Value @persist @trigger if (On|On2==1){ Value=797 } if (On|On2==0){ Value=697 }
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.
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 }
Bookmarks