Author Topic: Doors  (Read 1464 times)

How would I make a door open with a key and make it close auto after a few seconds Meh

Code: [Select]
[Time in MS] [Toggled] [Input Event] [Target] [Output Event] [Params]
   0 | x | onKeyHit | self | doorOpen           |
2000 | x | onKeyHit | self | doorClose          |
   0 | x | onKeyHit | self | toggleEventEnabled | 0 1 2 3
2000 | x | onKeyHit | self | toggleEventEnabled | 0 1 2 3
It's been a while since I've messed with the key events, but you should get the point.
The first two goes on ahead and opens, and sets out to close the door while the last two disables it to prevent it from being spammed and then after two seconds pass re-enable the events.

or just

onkeyhit | door |doortoggle

or just

onkeyhit | door |doortoggle
But that wouldn't close automatically.

Code: [Select]
[Time in MS] [Toggled] [Input Event] [Target] [Output Event] [Params]
   0 | x | onKeyHit | self | doorOpen           |
2000 | x | onKeyHit | self | doorClose          |
   0 | x | onKeyHit | self | toggleEventEnabled | 0 1 2 3
2000 | x | onKeyHit | self | toggleEventEnabled | 0 1 2 3
It's been a while since I've messed with the key events, but you should get the point.
The first two goes on ahead and opens, and sets out to close the door while the last two disables it to prevent it from being spammed and then after two seconds pass re-enable the events.
something along the lines of
Code: [Select]
0 onKeyHit > Self > doorOpen
2000 onKeyHit > self > doorClose
0 onKeyHit > Self > setEventsEnabled 0 1 2 3 false
2000 onKeyHit > Self > setEventsEnabled 0 1 2 3 true
5000 onKeyHit > self > fireRelay
0 onRelay > self > setEventsEnabled 0 1 2 3 true
might work better, just to make sure it can't break from events being canceled
(How to make a button that you can't spam click on?)

But that wouldn't close automatically.
depens on door. JVS closes automaticly


Do they?
Maybe if you're using legacy doors. But not normally.